Skip to content

Commit

Permalink
Add lambda endpoint for updating from airtable
Browse files Browse the repository at this point in the history
  • Loading branch information
trbarrett committed Jun 12, 2020
1 parent 3116ae6 commit 7085cc9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ functions:
path: "/cards"
cors: true

updateCardsFromAirtable:
handler: BigHack.Fumble.Api::BigHack.Fumble.Api.LambdaFunctions::updateFromAirtable
events:
- http:
method: POST
path: "/updateFromAirtable"
cors: true

resources:
Resources:
CardsDynamoDBTable:
Expand Down
2 changes: 1 addition & 1 deletion src/LambdaFunctions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ let updateFromAirtable (gatewayRequest : APIGatewayProxyRequest)
Ok ()
|> handleJsonRequest lambdaContext
"UpdateCards"
Workflow.updateFromAirtable
(fun ctx () -> Workflow.updateFromAirtable ctx)
ResponseDto.mapEmptyResultToDto

0 comments on commit 7085cc9

Please sign in to comment.