Skip to content

Commit 490fa92

Browse files
authored
fixes getUserIdMappingWithUserIds (#51)
1 parent c6d42ce commit 490fa92

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/io/supertokens/storage/postgresql/queries/UserIdMappingQueries.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ public static UserIdMapping[] getUserIdMappingWithEitherSuperTokensUserIdOrExter
110110

111111
public static HashMap<String, String> getUserIdMappingWithUserIds(Start start, ArrayList<String> userIds)
112112
throws SQLException, StorageQueryException {
113+
114+
if (userIds.size() == 0) {
115+
return new HashMap<>();
116+
}
117+
113118
StringBuilder QUERY = new StringBuilder(
114119
"SELECT * FROM " + Config.getConfig(start).getUserIdMappingTable() + " WHERE supertokens_user_id IN (");
115120
for (int i = 0; i < userIds.size(); i++) {

0 commit comments

Comments
 (0)