1 files changed, 3 insertions, 1 deletions
diff --git a/api/src/util/route.ts b/api/src/util/handlers/route.ts
index e4794eb5..05658ad3 100644
--- a/api/src/util/route.ts
+++ b/api/src/util/handlers/route.ts
@@ -18,8 +18,9 @@ import Ajv from "ajv";
import { AnyValidateFunction } from "ajv/dist/core";
import addFormats from "ajv-formats";
-const SchemaPath = path.join(__dirname, "..", "..", "assets", "schemas.json");
+const SchemaPath = path.join(__dirname, "..", "..", "..", "assets", "schemas.json");
const schemas = JSON.parse(fs.readFileSync(SchemaPath, { encoding: "utf8" }));
+
export const ajv = new Ajv({
allErrors: true,
parseDate: true,
@@ -30,6 +31,7 @@ export const ajv = new Ajv({
strict: true,
strictRequired: true
});
+
addFormats(ajv);
declare global {
|