mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-04 01:11:27 +03:00
fix(api): service keys
This commit is contained in:
@@ -85,7 +85,7 @@ module.exports = async client => {
|
||||
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({
|
||||
elevate: 'admin',
|
||||
error: 'Unauthorised',
|
||||
|
@@ -11,6 +11,7 @@ module.exports.get = fastify => ({
|
||||
token: this.jwt.sign({
|
||||
createdAt: Date.now(),
|
||||
id: req.user.id,
|
||||
service: true,
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user