Admin endpoints
This commit is contained in:
@ -59,6 +59,8 @@ router.post('hooks.slack', async ctx => {
|
||||
});
|
||||
|
||||
if (!user) throw httpErrors.BadRequest('Invalid user');
|
||||
if (!user.isAdmin)
|
||||
throw httpErrors.BadRequest('Only admins can add integrations');
|
||||
|
||||
const documents = await Document.searchForUser(user, text, {
|
||||
limit: 5,
|
||||
|
Reference in New Issue
Block a user