From c6b2484c453593c21ffb47127f11f469a25d5ed0 Mon Sep 17 00:00:00 2001 From: philc Date: Tue, 20 Feb 2024 15:44:27 +0100 Subject: [PATCH] clean --- models/Odmdb.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/Odmdb.js b/models/Odmdb.js index 6f3aa21..6f9c8dd 100644 --- a/models/Odmdb.js +++ b/models/Odmdb.js @@ -232,7 +232,7 @@ Odmdb.Schema = (objectPathname, validschema, lg="en") => { res.data.schema.properties[p].type == "object" && res.data.schema.properties[p]["$ref"] ) { - const subschema = getpath(res.data.schema.properties[p]["$ref"]); + const subschema = path.resolve(`${objectPathname}/${res.data.schema.properties[p]["$ref"]}`); if (Object.keys(res.data.schema).length == 0) { res.status = 404; res.msg = "missingref"; @@ -250,6 +250,7 @@ Odmdb.Schema = (objectPathname, validschema, lg="en") => { res.data.schema.properties[p].options["$ref"] ) { const optionsfile = path.resolve(`${objectPathname}/${res.data.schema.properties[p].options["$ref"]}`) + if (log) console.log(currentmod,"Lien vers options:", optionsfile) if (!fs.existsSync(optionsfile)){ res.status = 404; res.msg = "missingref";