chore: upgrade sequelize (#965)
* 0.18.0 * chore: Upgrade sequelize 4 -> 5 * fix: migrations v5 support * fix: Majority of test failures * fix: the rest of v5 tests
This commit is contained in:
@ -49,7 +49,7 @@ router.post('apiKeys.delete', auth(), async ctx => {
|
||||
ctx.assertUuid(id, 'id is required');
|
||||
|
||||
const user = ctx.state.user;
|
||||
const key = await ApiKey.findById(id);
|
||||
const key = await ApiKey.findByPk(id);
|
||||
authorize(user, 'delete', key);
|
||||
|
||||
await key.destroy();
|
||||
|
Reference in New Issue
Block a user