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

More debug

This commit is contained in:
David Bolack
2024-03-06 12:03:27 -06:00
parent 6f6a06c8c3
commit 17f78169f2

View File

@@ -57,15 +57,19 @@ const getUsersBrewThemes = async (username, id)=>{
'textBin' 'textBin'
]; ];
const brews = await HomebrewModel.getByUser(username, true, fields, { tags: { $in: ['theme', 'Theme'] }, editId: { $ne: id } }) //lean() converts results to JSObjects
.catch((error)=>{throw 'Can not find brews';});
const userThemes = { const userThemes = {
Brew : { Brew : {
} }
}; };
if(!username || !id) {
return userThemes;
}
const brews = await HomebrewModel.getByUser(username, true, fields, { tags: { $in: ['theme', 'Theme'] }, editId: { $ne: id } }) //lean() converts results to JSObjects
.catch((error)=>{throw 'Can not find brews';});
for await (const brew of brews) { for await (const brew of brews) {
const brewTheme = await HomebrewModel.get({ editId: brew.editId }, ['textBin']); const brewTheme = await HomebrewModel.get({ editId: brew.editId }, ['textBin']);
splitTextStyleAndMetadata(brewTheme); splitTextStyleAndMetadata(brewTheme);