mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2026-03-10 10:45:04 +00:00
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:
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
Reference in New Issue
Block a user