mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-01 21:42:44 +00:00
Merge branch 'master' into Language-Attribute
This commit is contained in:
@@ -181,6 +181,7 @@ app.get('/user/:username', async (req, res, next)=>{
|
||||
'createdAt',
|
||||
'updatedAt',
|
||||
'lastViewed',
|
||||
'thumbnail',
|
||||
'tags'
|
||||
];
|
||||
|
||||
|
||||
@@ -147,8 +147,7 @@ const GoogleActions = {
|
||||
editId : brew.editId || nanoid(12),
|
||||
pageCount : brew.pageCount,
|
||||
renderer : brew.renderer || 'legacy',
|
||||
isStubbed : true,
|
||||
thumbnail : brew.thumbnail
|
||||
isStubbed : true
|
||||
}
|
||||
},
|
||||
media : {
|
||||
@@ -186,8 +185,7 @@ const GoogleActions = {
|
||||
pageCount : brew.pageCount,
|
||||
renderer : brew.renderer || 'legacy',
|
||||
isStubbed : true,
|
||||
version : 1,
|
||||
thumbnail : brew.thumbnail || ''
|
||||
version : 1
|
||||
}
|
||||
};
|
||||
|
||||
@@ -267,7 +265,6 @@ const GoogleActions = {
|
||||
views : parseInt(obj.data.properties.views) || 0, //brews with no view parameter will return undefined
|
||||
version : parseInt(obj.data.properties.version) || 0,
|
||||
renderer : obj.data.properties.renderer ? obj.data.properties.renderer : 'legacy',
|
||||
thumbnail : obj.data.properties.thumbnail || '',
|
||||
|
||||
googleId : id
|
||||
};
|
||||
|
||||
@@ -108,7 +108,7 @@ const excludePropsFromUpdate = (brew)=>{
|
||||
|
||||
const excludeGoogleProps = (brew)=>{
|
||||
const modified = _.clone(brew);
|
||||
const propsToExclude = ['tags', 'systems', 'published', 'authors', 'owner', 'views'];
|
||||
const propsToExclude = ['tags', 'systems', 'published', 'authors', 'owner', 'views', 'thumbnail'];
|
||||
for (const prop of propsToExclude) {
|
||||
delete modified[prop];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user