mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2026-03-10 10:45:04 +00:00
Finish share confirmation page
Adding nav and info passing
This commit is contained in:
@@ -19,10 +19,14 @@ public class PictureGetter implements CallHandler {
|
||||
@Override
|
||||
public Object conductAction(Map<String, Object> bodyMap, HashMap<String, String> queryMap, String cognitoID) throws SQLException {
|
||||
PreparedStatement statement = connection.prepareStatement(GET_ITEM);
|
||||
if (!queryMap.containsKey("id") || !queryMap.get("id").toString().equals("profile")) {
|
||||
throw new IllegalArgumentException("Only profile pictures are currently supported.");
|
||||
if (!queryMap.containsKey("id")) {
|
||||
throw new IllegalArgumentException("Must have id set.");
|
||||
}
|
||||
if (queryMap.get("id").equals("profile")) {
|
||||
statement.setString(1, cognitoID);
|
||||
} else {
|
||||
statement.setString(1, queryMap.get("id"));
|
||||
}
|
||||
statement.setString(1, cognitoID);
|
||||
System.out.println(statement);
|
||||
ResultSet queryResults = statement.executeQuery();
|
||||
queryResults.first();
|
||||
|
||||
@@ -28,6 +28,9 @@ public class UserGetter implements CallHandler {
|
||||
System.out.println(userPoolId);
|
||||
ListUsersRequest checkRequest = new ListUsersRequest().withUserPoolId(userPoolId);
|
||||
Object emailObject = bodyMap.get("emailToCheck");
|
||||
if (queryMap.get("id").contains("@")) {
|
||||
emailObject = queryMap.get("id");
|
||||
}
|
||||
String attributeToGet = "sub";
|
||||
if (emailObject != null) {
|
||||
checkRequest.setFilter("email=\"" + emailObject.toString() +"\"");
|
||||
|
||||
Reference in New Issue
Block a user