juanjoDiaz / serverless-middleware

Serverless plugin to allow middleware handlers configured directly in serverless.yaml
MIT License
18 stars 11 forks source link

other lambda functions are in .middleware. #56

Open kim00425 opened 5 months ago

kim00425 commented 5 months ago
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?

juanjoDiaz commented 4 months ago

I don't understand the problem. All lambdas using middleware should be present in .middleware.