File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,8 +47,6 @@ COPY --from=builder ${LAMBDA_TASK_ROOT}/function ${LAMBDA_TASK_ROOT}/function/
4747# Install only the necessary dependencies
4848RUN npm ci --omit=dev
4949
50- # TODO do we need USER here? What to use for Lambda?
51-
5250# The Lambda handler function must be the CMD instruction
5351CMD [ "index.handler" ]
5452
Original file line number Diff line number Diff line change 1414
1515## 🗺 Project Layout
1616
17- <!-- TODO update below info -->
18-
1917``` ascii
2018.
2119├── .github/ # GitHub Actions and other GitHub-related files
22- ├── function/ # tsc-compiled Lambda fn runtime files
23- └── src/ # TypeScript source code files
20+ └── src/ # TypeScript source code files (tsc compiles src to outDir function/)
2421```
2522
2623## 📝 License
Original file line number Diff line number Diff line change @@ -12,16 +12,10 @@ import {
1212 * 1. fixit-api async invocation with payload.pushNotifications
1313 * 2. EventBridge rule "run-fetchPushReceipts-every-30-minutes"
1414 */
15- export const handler : Handler = async ( event : PushServiceEvent ) => {
16- // TODO After we get 'event' structure printed out, make a better type for it (aws-lambda not helpful here)
17- console . log ( `(handler) event = ${ JSON . stringify ( event , null , 2 ) } ` ) ;
18-
19- const { payload, resources } = event ;
20-
15+ export const handler : Handler = async ( { payload, resources } : PushServiceEvent ) => {
2116 if ( Array . isArray ( payload ?. pushNotifications ) ) {
2217 await sendPushNotificationsToExpo ( payload ! . pushNotifications ) ;
2318 } else if ( resources ?. [ 0 ] ?. match ( / f e t c h P u s h R e c e i p t s / i) ?? false ) {
24- // TODO make sure the event rule will always be 0-index
2519 await fetchPushReceipts ( ) ;
2620 }
2721} ;
You can’t perform that action at this time.
0 commit comments