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:
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user