Skip to content

Commit

Permalink
Change Not an Author to 401
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Ambatte committed Jun 25, 2023
1 parent d1412ab commit da8e7ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/homebrew.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit da8e7ec

Please sign in to comment.