clean
This commit is contained in:
@@ -232,7 +232,7 @@ Odmdb.Schema = (objectPathname, validschema, lg="en") => {
|
|||||||
res.data.schema.properties[p].type == "object" &&
|
res.data.schema.properties[p].type == "object" &&
|
||||||
res.data.schema.properties[p]["$ref"]
|
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) {
|
if (Object.keys(res.data.schema).length == 0) {
|
||||||
res.status = 404;
|
res.status = 404;
|
||||||
res.msg = "missingref";
|
res.msg = "missingref";
|
||||||
@@ -250,6 +250,7 @@ Odmdb.Schema = (objectPathname, validschema, lg="en") => {
|
|||||||
res.data.schema.properties[p].options["$ref"]
|
res.data.schema.properties[p].options["$ref"]
|
||||||
) {
|
) {
|
||||||
const optionsfile = path.resolve(`${objectPathname}/${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)){
|
if (!fs.existsSync(optionsfile)){
|
||||||
res.status = 404;
|
res.status = 404;
|
||||||
res.msg = "missingref";
|
res.msg = "missingref";
|
||||||
|
Reference in New Issue
Block a user