mirror of
https://github.com/KeyZox71/knl_meowscendence.git
synced 2025-12-31 21:56:41 +01:00
「🔨」 fix(user-management): fix the fact the no fucking route was protected
This commit is contained in:
@ -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' });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user