0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-12 21:52:42 +00:00

initial commit

This commit is contained in:
Víctor Losada Hernández
2024-04-07 16:16:21 +02:00
parent 9f6bc10369
commit 99f9b10348
2 changed files with 20 additions and 4 deletions

View File

@@ -83,9 +83,9 @@ const api = {
if(accessType === 'edit' && (authorsExist && !(isAuthor || isInvited))) {
const accessError = { name: 'Access Error', status: 401 };
if(req.account){
throw { ...accessError, message: 'User is not an Author', HBErrorCode: '03', authors: stub.authors, brewTitle: stub.title, shareId: stub.shareId };
throw { ...accessError, message: 'User is not an Author', HBErrorCode: '03', authors: stub.authors, brewTitle: stub.title, shareId: stub.shareId, published: stub.published };
}
throw { ...accessError, message: 'User is not logged in', HBErrorCode: '04', authors: stub.authors, brewTitle: stub.title };
throw { ...accessError, message: 'User is not logged in', HBErrorCode: '04', authors: stub.authors, brewTitle: stub.title, shareId: stub.shareId , published: stub.published};
}
// If after all of that we still don't have a brew, throw an exception