mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-16 02:38:47 +00:00
Merge pull request #141 from ClaytonWWilson/lambda-robustness
Fix other user email retrieval
This commit is contained in:
commit
bea868628c
@ -33,15 +33,12 @@ public class UserGetter implements CallHandler {
|
||||
checkRequest.setFilter("email=\"" + emailObject.toString() +"\"");
|
||||
} else {
|
||||
try {
|
||||
// String id = queryMap.get("id");
|
||||
String id = queryMap.get("id");
|
||||
attributeToGet = "email";
|
||||
checkRequest.setFilter("sub=\"" + cognitoID + "\"");
|
||||
// if ((id != null) && (!id.equals(""))) {
|
||||
// attributeToGet = "email";
|
||||
// checkRequest.setFilter("sub=\"" + cognitoID + "\"");
|
||||
// } else {
|
||||
// return cognitoID;
|
||||
// }
|
||||
if ((id != null) && (!id.equals(""))) {
|
||||
checkRequest.setFilter("sub=\"" + id + "\"");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println(e);
|
||||
return new User(cognitoID, null);
|
||||
|
||||
@ -69,7 +69,7 @@ public class AuthManager {
|
||||
jsonException.printStackTrace();
|
||||
}
|
||||
SynchronousReceiver<User> userSynchronousReceiver = new SynchronousReceiver<>();
|
||||
requestor.getObject("self", User.class, userSynchronousReceiver);
|
||||
requestor.getObject("", User.class, userSynchronousReceiver);
|
||||
try {
|
||||
email = userSynchronousReceiver.await().getEmail();
|
||||
} catch (Exception e) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user