0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-31 21:42:44 +00:00

Error message if chosen theme does not have "meta:theme" tag.

This commit is contained in:
Trevor Buckner
2025-02-13 15:51:06 -05:00
parent bf297939dc
commit d8d672fada
3 changed files with 23 additions and 0 deletions

View File

@@ -294,6 +294,8 @@ const api = {
currentTheme = req.brew;
splitTextStyleAndMetadata(currentTheme);
if(!currentTheme.tags.some(tag => tag === "meta:theme" || tag === "meta:Theme"))
throw { brewId: req.params.id, name: 'Invalid Theme Selected', message: 'Selected theme does not have the meta:theme tag', HBErrorCode: '10' };
themeName ??= currentTheme.title;
themeAuthor ??= currentTheme.authors?.[0];