Disable validation for JSON settings protos update

This commit is contained in:
Rory& 2025-10-01 20:22:18 +02:00
parent c232d5c82e
commit d8b2fd4258

View File

@ -46,6 +46,9 @@ export const ajv = new Ajv({
addFormats(ajv);
export function validateSchema<G extends object>(schema: string, data: G): G {
// skip validation for settings proto JSON updates - TODO: figure out if this even possible?
if(schema === "SettingsProtoUpdateJsonSchema") return data;
const valid = ajv.validate(schema, data);
if (!valid) throw ajv.errors;
return data;