Skip to content

Commit

Permalink
fix: feature flag issue (#733)
Browse files Browse the repository at this point in the history
* fix: feature flag issue

* fix: mau -1 for mongo
  • Loading branch information
sattvikc authored Jun 30, 2023
1 parent f855cfa commit 5a302de
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ee/src/main/java/io/supertokens/ee/EEFeatureFlag.java
Original file line number Diff line number Diff line change
@@ -288,7 +288,7 @@ public JsonObject getPaidFeatureStats() throws StorageQueryException, TenantOrAp

EE_FEATURES[] features = getEnabledEEFeaturesFromDbOrCache();

if (!Arrays.asList(features).contains(EE_FEATURES.MULTI_TENANCY)) { // Check for multitenancy on the base app
if (!this.appIdentifier.equals(new AppIdentifier(null, null)) && !Arrays.asList(features).contains(EE_FEATURES.MULTI_TENANCY)) { // Check for multitenancy on the base app
EE_FEATURES[] baseFeatures = FeatureFlag.getInstance(main, new AppIdentifier(null, null))
.getEnabledFeatures();
for (EE_FEATURES feature: baseFeatures) {
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ protected void doTaskPerApp(AppIdentifier app) throws Exception {
ActiveUsersStorage activeUsersStorage = (ActiveUsersStorage) StorageLayer.getStorage(app.getAsPublicTenantIdentifier(), main);
json.addProperty("mau", activeUsersStorage.countUsersActiveSince(app, System.currentTimeMillis() - 30 * 24 * 3600 * 1000L));
} else {
json.addProperty("mau", 0);
json.addProperty("mau", -1);
}
json.addProperty("appId", app.getAppId());
json.addProperty("connectionUriDomain", app.getConnectionUriDomain());

0 comments on commit 5a302de

Please sign in to comment.