Skip to content

Commit

Permalink
fix: pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Aug 24, 2023
1 parent 4c4ddbc commit 83bbe05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ public static AuthRecipeUserInfo[] getUsers(Start start, TenantIdentifier tenant
// usersFromQuery
Map<String, AuthRecipeUserInfo> userIdToInfoMap = new HashMap<>();
for (AuthRecipeUserInfo user : users) {
userIdToInfoMap.put(user.getUserIdNotToBeReturnedFromAPI(), user);
userIdToInfoMap.put(user.getSupertokensUserId(), user);
}
for (int i = 0; i < usersFromQuery.size(); i++) {
if (finalResult[i] == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ public void canLinkFailsIfTryingToLinkUsersAcrossDifferentStorageLayers() throws

AuthRecipeUserInfo user1 = EmailPassword.signUp(process.getProcess(), "[email protected]", "abcd1234");

AuthRecipe.createPrimaryUser(process.main, user1.getUserIdNotToBeReturnedFromAPI());
AuthRecipe.createPrimaryUser(process.main, user1.getSupertokensUserId());

AuthRecipeUserInfo user2 = EmailPassword.signUp(
tenantIdentifier.withStorage(StorageLayer.getStorage(tenantIdentifier, process.main)),
process.getProcess(), "[email protected]", "abcd1234");

try {
Map<String, String> params = new HashMap<>();
params.put("recipeUserId", user2.getUserIdNotToBeReturnedFromAPI());
params.put("primaryUserId", user1.getUserIdNotToBeReturnedFromAPI());
params.put("recipeUserId", user2.getSupertokensUserId());
params.put("primaryUserId", user1.getSupertokensUserId());

HttpRequestForTesting.sendGETRequest(process.getProcess(), "",
"http://localhost:3567/recipe/accountlinking/user/link/check", params, 1000, 1000, null,
Expand Down Expand Up @@ -139,8 +139,8 @@ public void canLinkFailsIfTryingToLinkUsersAcrossDifferentStorageLayers() throws
process.getProcess(), "[email protected]", "abcd1234");

Map<String, String> params = new HashMap<>();
params.put("recipeUserId", user3.getUserIdNotToBeReturnedFromAPI());
params.put("primaryUserId", user1.getUserIdNotToBeReturnedFromAPI());
params.put("recipeUserId", user3.getSupertokensUserId());
params.put("primaryUserId", user1.getSupertokensUserId());

JsonObject response = HttpRequestForTesting.sendGETRequest(process.getProcess(), "",
"http://localhost:3567/recipe/accountlinking/user/link/check", params, 1000, 1000, null,
Expand Down

0 comments on commit 83bbe05

Please sign in to comment.