Skip to content

Commit

Permalink
fix: stats
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Sep 24, 2024
1 parent 70a15a5 commit 08d25c9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 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
Expand Up @@ -347,7 +347,7 @@ private JsonObject getOAuthStats() throws StorageQueryException, TenantOrAppNotF
this.appIdentifier.getAsPublicTenantIdentifier(), main));

result.addProperty("totalNumberOfClients", oAuthStorage.countTotalNumberOfClientsForApp(appIdentifier));
result.addProperty("numberOfClientCredentialsOnlyClients", oAuthStorage.countTotalNumberOfClientsForApp(appIdentifier));
result.addProperty("numberOfClientCredentialsOnlyClients", oAuthStorage.countTotalNumberOfClientCredentialsOnlyClientsForApp(appIdentifier));
result.addProperty("numberOfM2MTokensAlive", oAuthStorage.countTotalNumberOfM2MTokensAlive(appIdentifier));

long now = System.currentTimeMillis();
Expand Down
1 change: 0 additions & 1 deletion src/main/java/io/supertokens/inmemorydb/Start.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ public class Start
ActiveUsersSQLStorage, DashboardSQLStorage, AuthRecipeSQLStorage, OAuthSQLStorage {

private static final Object appenderLock = new Object();
private static final String APP_ID_KEY_NAME = "app_id";
private static final String ACCESS_TOKEN_SIGNING_KEY_NAME = "access_token_signing_key";
private static final String REFRESH_TOKEN_KEY_NAME = "refresh_token_key";
public static boolean isTesting = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public static int countTotalNumberOfM2MTokensAlive(Start start, AppIdentifier ap
" WHERE app_id = ? AND exp > ?";
return execute(start, QUERY, pst -> {
pst.setString(1, appIdentifier.getAppId());
pst.setLong(2, System.currentTimeMillis());
pst.setLong(2, System.currentTimeMillis()/1000);
}, result -> {
if (result.next()) {
return result.getInt("c");
Expand Down

0 comments on commit 08d25c9

Please sign in to comment.