mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
feat: send 401 for invalid-uid
This commit is contained in:
@@ -362,6 +362,10 @@ helpers.formatApiResponse = async (statusCode, res, payload) => {
|
||||
case '[[error:no-privileges]]':
|
||||
statusCode = 403;
|
||||
break;
|
||||
|
||||
case '[[error:invalid-uid]]':
|
||||
statusCode = 401;
|
||||
break;
|
||||
}
|
||||
|
||||
const returnPayload = helpers.generateError(statusCode, message);
|
||||
|
||||
Reference in New Issue
Block a user