Finish share confirmation page

Adding nav and info passing
This commit is contained in:
NMerz
2020-12-03 10:10:51 -05:00
parent e6af05a6b4
commit 6e653b4ae2
7 changed files with 67 additions and 24 deletions

View File

@@ -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();

View File

@@ -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() +"\"");