test: fix tests, dont hang if payload is string

closes #11933
This commit is contained in:
Barış Soner Uşaklı
2023-08-19 16:40:43 -04:00
parent 82d95ba812
commit 6b09b7c7d4
4 changed files with 14 additions and 13 deletions

View File

@@ -20,7 +20,7 @@ chatsController.get = async function (req, res, next) {
}
const canChat = await privileges.global.can('chat', req.uid);
if (!canChat) {
return helpers.notAllowed(req, res, '[[error:no-privileges]]');
return helpers.notAllowed(req, res);
}
const payload = {