fix(backend): add auth middleware to walkthrough routes
Some checks failed
Deploy to Production / deploy (push) Failing after 0s
Test / backend-test (push) Failing after 0s
Test / frontend-test (push) Failing after 1s

This commit is contained in:
fullsizemalt 2025-12-11 20:29:50 -08:00
parent 046bb9361e
commit 73958c5a5f

View file

@ -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);