serverless-middleware
serverless-middleware copied to clipboard
other lambda functions are in .middleware.
getItems:
handler: src/serverless/items/handler.getItems
events:
- http:
path: items
method: get
cors: true
middleware:
pre:
- src/middleware/index.checkHeader
setItems:
handler: src/serverless/items/handler.setItesm
events:
- http:
path: items
method: post
cors: true
middleware:
pre:
- src/middleware/index.checkHeader
when applying the code above, in the code of getItems, there are setItems.js and map files in .middleware, setItems also has js and map files for getItems.
what should i check more?