Open salamat9 opened 8 months ago
I have function
getCategories: middleware: pre: - ./src/middleware/auth.middleware handler: ./src/handlers/categories/getAll.handler events: - http: path: /api/categories method: GET cors: true
src/middleware/auth.ts
export const middleware = async (event: any, context: any) => { try { console.log("hello from auth middleware"); console.log(event); console.log(context); } catch (err) { console.log(err); } };
when i trigger my function it ignores the middleware
Hi @salamat9 ,
How are you triggering your function?
Did you check the code that was publish to AWS? Did it include the middleware?
I have function
src/middleware/auth.ts
when i trigger my function it ignores the middleware