Skip to content

Commit

Permalink
fix: minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Oct 25, 2023
1 parent 9942400 commit ab6c9da
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Set;

import static io.supertokens.storage.postgresql.QueryExecutorTemplate.execute;
import static io.supertokens.storage.postgresql.QueryExecutorTemplate.update;
Expand Down Expand Up @@ -91,7 +92,7 @@ public static void createFirstFactors(Start start, Connection sqlCon, TenantIden
}

String QUERY = "INSERT INTO " + getConfig(start).getFirstFactorsTable() + "(connection_uri_domain, app_id, tenant_id, factor_id) VALUES (?, ?, ?, ?);";
for (String factorId : firstFactors) {
for (String factorId : Set.of(firstFactors)) {
update(sqlCon, QUERY, pst -> {
pst.setString(1, tenantIdentifier.getConnectionUriDomain());
pst.setString(2, tenantIdentifier.getAppId());
Expand All @@ -108,7 +109,7 @@ public static void createDefaultRequiredFactorIds(Start start, Connection sqlCon
}

String QUERY = "INSERT INTO " + getConfig(start).getDefaultRequiredFactorIdsTable() + "(connection_uri_domain, app_id, tenant_id, factor_id) VALUES (?, ?, ?, ?);";
for (String factorId : defaultRequiredFactorIds) {
for (String factorId : Set.of(defaultRequiredFactorIds)) {
update(sqlCon, QUERY, pst -> {
pst.setString(1, tenantIdentifier.getConnectionUriDomain());
pst.setString(2, tenantIdentifier.getAppId());
Expand Down

0 comments on commit ab6c9da

Please sign in to comment.