feat: tan stack theme query

This commit is contained in:
Gabriellvl 2025-03-22 00:59:37 +01:00
parent 47a522e443
commit 2b509774b8
6 changed files with 197 additions and 64 deletions

View file

@ -23,6 +23,12 @@ export function getThemes(req: Request, res: Response) {
export function getThemeByTitle(req: Request, res: Response) {
const themeKey = req.params.theme;
if (!theme) {
res.status(400).json({ error: 'Missing required field: theme' });
return;
}
const theme = themes.find((t) => t.title === themeKey);
if (theme) {