0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Change Not an Author to 401

This commit is contained in:
G.Ambatte
2023-06-25 16:51:17 +12:00
parent d1412abe03
commit da8e7ec610

View File

@@ -68,7 +68,7 @@ const api = {
const isAuthor = stub?.authors?.includes(req.account?.username);
const isInvited = stub?.invitedAuthors?.includes(req.account?.username);
if(accessType === 'edit' && (authorsExist && !(isAuthor || isInvited))) {
throw { name: 'Access Error', message: 'User is not an Author', status: 403, HBErrorCode: '03' };
throw { name: 'Access Error', message: 'User is not an Author', status: 401, HBErrorCode: '03' };
}
// If after all of that we still don't have a brew, throw an exception