Disable validation for JSON settings protos update
This commit is contained in:
parent
c232d5c82e
commit
d8b2fd4258
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user