mirror of
https://github.com/outline/outline.git
synced 2026-11-28 16:19:46 +03:00
Correct ApiKey delete auth check
This commit is contained in:
1 parent
7a0aa0ecf8
commit
d73196594d
1 file changed
+1
-1
@@ -53,7 +53,7 @@ router.post('apiKeys.delete', auth(), async ctx => {
|
||||
|
||||
const user = ctx.state.user;
|
||||
const key = await ApiKey.findById(id);
|
||||
authorize(user, 'delete', ApiKey);
|
||||
authorize(user, 'delete', key);
|
||||
|
||||
try {
|
||||
await key.destroy();
|
||||
|
||||
Reference in new issue
Block a user