mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-14 22:45:14 +00:00
Disable validation for JSON settings protos update
This commit is contained in:
@@ -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