mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-05 09:41:27 +03:00
fix(api): service keys
This commit is contained in:
@@ -85,7 +85,7 @@ module.exports = async client => {
|
|||||||
statusCode: 451,
|
statusCode: 451,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!req.user.scopes?.includes('applications.commands.permissions.update')) {
|
if (!req.user.service && !req.user.scopes?.includes('applications.commands.permissions.update')) {
|
||||||
return res.code(401).send({
|
return res.code(401).send({
|
||||||
elevate: 'admin',
|
elevate: 'admin',
|
||||||
error: 'Unauthorised',
|
error: 'Unauthorised',
|
||||||
|
@@ -11,6 +11,7 @@ module.exports.get = fastify => ({
|
|||||||
token: this.jwt.sign({
|
token: this.jwt.sign({
|
||||||
createdAt: Date.now(),
|
createdAt: Date.now(),
|
||||||
id: req.user.id,
|
id: req.user.id,
|
||||||
|
service: true,
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user