🔨」 fix(user-management): fix the fact the no fucking route was protected

This commit is contained in:
2025-10-23 15:49:35 +02:00
parent c4221d9463
commit 0c9f595047
19 changed files with 76 additions and 48 deletions

View File

@ -173,6 +173,7 @@ export default async function(fastify, options) {
if (jwt.user !== 'admin') {
throw ('You lack administrator privileges');
}
request.user = jwt.user;
} catch (err) {
reply.code(401).send({ error: 'Unauthorized' });
}