fix: add forest, mono, cyber to settings API validThemes allowlist
This commit is contained in:
@@ -45,7 +45,7 @@ export const PUT: RequestHandler = async ({ request, locals }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// theme is optional — if provided (and non-empty) it must be a known value
|
// theme is optional — if provided (and non-empty) it must be a known value
|
||||||
const validThemes = ['amber', 'slate', 'rose', 'light', 'light-slate', 'light-rose'];
|
const validThemes = ['amber', 'slate', 'rose', 'forest', 'mono', 'cyber', 'light', 'light-slate', 'light-rose'];
|
||||||
if (body.theme !== undefined && body.theme !== '' && !validThemes.includes(body.theme)) {
|
if (body.theme !== undefined && body.theme !== '' && !validThemes.includes(body.theme)) {
|
||||||
error(400, `Invalid theme — must be one of: ${validThemes.join(', ')}`);
|
error(400, `Invalid theme — must be one of: ${validThemes.join(', ')}`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user