1
0
forked from apxtri/apxtri
This commit is contained in:
philc 2024-02-20 15:44:27 +01:00
parent 0a686bf1b5
commit c6b2484c45

View File

@ -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";