diff --git a/backend/src/routes/walkthrough.routes.ts b/backend/src/routes/walkthrough.routes.ts index 6d74898..4d17b96 100644 --- a/backend/src/routes/walkthrough.routes.ts +++ b/backend/src/routes/walkthrough.routes.ts @@ -10,6 +10,15 @@ import { } from '../controllers/walkthrough.controller'; export async function walkthroughRoutes(server: FastifyInstance) { + // Auth middleware + server.addHook('onRequest', async (request) => { + try { + await request.jwtVerify(); + } catch (err) { + throw err; + } + }); + // Walkthrough CRUD server.post('/', createWalkthrough); server.get('/', getWalkthroughs);