Client API connection infrastructure

Create the infrastructure for the client to connect to API gateway in a generic manner. Tested with the ListPOST lambda.
This commit is contained in:
NMerz
2020-09-27 11:54:26 -04:00
parent a97caebd04
commit 2c9334ee9e
19 changed files with 275 additions and 136 deletions

View File

@@ -18,7 +18,7 @@ public class ListAdder {
public void add(Map<String, Object> bodyMap) throws SQLException {
Connection connection = connector.getConnection();
PreparedStatement statement = connection.prepareStatement(LIST_CREATE);
statement.setString(1, bodyMap.get("Name").toString());
statement.setString(1, bodyMap.get("name").toString());//Needs safe checking
statement.setString(2, cognitoID);
System.out.println(statement);
statement.executeUpdate();

View File

@@ -5,7 +5,7 @@ import java.util.Map;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.RequestHandler;
public class ListsPOST implements RequestHandler<Map<String,Object>, String>{
public class ListPOST implements RequestHandler<Map<String,Object>, String>{
public String handleRequest(Map<String, Object> inputMap, Context unfilled) {