0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-27 13:42:38 +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'
];
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 = {
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) {
const brewTheme = await HomebrewModel.get({ editId: brew.editId }, ['textBin']);
splitTextStyleAndMetadata(brewTheme);