0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-07 16:22:42 +00:00

Add owner info to missing Google file message

This commit is contained in:
G.Ambatte
2023-06-26 17:43:19 +12:00
parent cff4f8eae5
commit c5f4793c23
2 changed files with 3 additions and 2 deletions

View File

@@ -25,7 +25,8 @@ const errorIndex = (props)=>{
you tried to open doesn't work anymore. The Homebrewery cannot delete files you tried to open doesn't work anymore. The Homebrewery cannot delete files
from your Google Drive on its own, so there are three most likely possibilities: from your Google Drive on its own, so there are three most likely possibilities:
: :
- **You may have accidentally deleted the Google Drive files.** Look on your Google Drive - **You may have accidentally deleted the Google Drive files.** Look on
${props.brew.authors?.length > 0 ? `the Google Drive account associated with the **${props.brew.authors[0]}** Homebrewery account` : 'your Google Drive account'}
and make sure the Homebrewery folder is still there, and that it holds your brews and make sure the Homebrewery folder is still there, and that it holds your brews
as text files. as text files.
- **You may have changed the sharing settings for your files.** If the files - **You may have changed the sharing settings for your files.** If the files

View File

@@ -59,7 +59,7 @@ const api = {
// Throw any error caught while attempting to retrieve Google brew. // Throw any error caught while attempting to retrieve Google brew.
if(googleError) { if(googleError) {
const reason = googleError.errors[0].reason; const reason = googleError.errors[0].reason;
throw { ...googleError, HBErrorCode: reason == 'notFound' ? '02' : '01' }; throw { ...googleError, HBErrorCode: reason == 'notFound' ? '02' : '01', authors: stub?.authors };
} }
// Combine the Homebrewery stub with the google brew, or if the stub doesn't exist just use the google brew // Combine the Homebrewery stub with the google brew, or if the stub doesn't exist just use the google brew
stub = stub ? _.assign({ ...api.excludeStubProps(stub), stubbed: true }, api.excludeGoogleProps(googleBrew)) : googleBrew; stub = stub ? _.assign({ ...api.excludeStubProps(stub), stubbed: true }, api.excludeGoogleProps(googleBrew)) : googleBrew;