mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-04 03:52:40 +00:00
Add brew title to Not an Author page
This commit is contained in:
@@ -55,7 +55,9 @@ const errorIndex = (props)=>{
|
|||||||
as an author by opening the brew, viewing the Properties tab, and adding your username
|
as an author by opening the brew, viewing the Properties tab, and adding your username
|
||||||
to the "invited authors" list. You can then try to access this document again.
|
to the "invited authors" list. You can then try to access this document again.
|
||||||
|
|
||||||
Current Authors:
|
**Brew Title:** ${props.brew.brewTitle || 'Unable to show title'}
|
||||||
|
|
||||||
|
**Current Authors:**
|
||||||
|
|
||||||
${props.brew.authors?.map((author)=>{return `- ${author}`;}).join('\n') || 'Unable to list authors'}
|
${props.brew.authors?.map((author)=>{return `- ${author}`;}).join('\n') || 'Unable to list authors'}
|
||||||
`,
|
`,
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ const api = {
|
|||||||
if(accessType === 'edit' && (authorsExist && !(isAuthor || isInvited))) {
|
if(accessType === 'edit' && (authorsExist && !(isAuthor || isInvited))) {
|
||||||
const accessError = { name: 'Access Error', status: 401 };
|
const accessError = { name: 'Access Error', status: 401 };
|
||||||
if(req.account){
|
if(req.account){
|
||||||
throw { ...accessError, message: 'User is not an Author', HBErrorCode: '03', authors: stub.authors };
|
throw { ...accessError, message: 'User is not an Author', HBErrorCode: '03', authors: stub.authors, brewTitle: stub.title };
|
||||||
}
|
}
|
||||||
throw { ...accessError, message: 'User is not logged in', HBErrorCode: '04' };
|
throw { ...accessError, message: 'User is not logged in', HBErrorCode: '04' };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user