Picture tests addec

This commit is contained in:
Adam Ding
2020-12-01 21:11:25 -05:00
parent 8385888075
commit 337c2e117b
4 changed files with 87 additions and 1 deletions

View File

@@ -19,7 +19,7 @@ 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.get("id").toString().equals("profile")) {
if (!queryMap.containsKey("id") || !queryMap.get("id").toString().equals("profile")) {
throw new IllegalArgumentException("Only profile pictures are currently supported.");
}
statement.setString(1, cognitoID);