0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-02 02:02:43 +00:00

update googleActions and related files to use service-level auth where viable

This commit is contained in:
Charlie Humphreys
2022-02-14 22:21:58 -06:00
parent 42afbd3e70
commit 59d08a7414
3 changed files with 32 additions and 45 deletions

View File

@@ -25,7 +25,7 @@ const getBrewFromId = asyncHandler(async (id, accessType)=>{
if(id.length > 12) {
const googleId = id.slice(0, -12);
id = id.slice(-12);
brew = await GoogleActions.readFileMetadata(config.get('google_api_key'), googleId, id, accessType);
brew = await GoogleActions.readFileMetadata(googleId, id, accessType);
} else {
brew = await HomebrewModel.get(accessType == 'edit' ? { editId: id } : { shareId: id });
brew = brew.toObject(); // Convert MongoDB object to standard Javascript Object