From 73958c5a5f0ccd163b4abe65883b08b6a218a770 Mon Sep 17 00:00:00 2001 From: fullsizemalt <106900403+fullsizemalt@users.noreply.github.com> Date: Thu, 11 Dec 2025 20:29:50 -0800 Subject: [PATCH] fix(backend): add auth middleware to walkthrough routes --- backend/src/routes/walkthrough.routes.ts | 9 +++++++++ 1 file changed, 9 insertions(+) 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);