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

Add test for missing meta:theme tag

This commit is contained in:
Trevor Buckner
2025-02-13 16:20:50 -05:00
parent 50bda9455f
commit 94f478477d
2 changed files with 22 additions and 1 deletions

View File

@@ -295,7 +295,7 @@ 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' };
throw { brewId: req.params.id, name: 'Invalid Theme Selected', message: 'Selected theme does not have the meta:theme tag', status: 422, HBErrorCode: '10' };
themeName ??= currentTheme.title;
themeAuthor ??= currentTheme.authors?.[0];