Skip to content

Commit

Permalink
fix: No such file or directory
Browse files Browse the repository at this point in the history
The debug mongoose models json  cause the server cannot run
Remove the debug function
  • Loading branch information
Chinlinlee committed Dec 9, 2020
1 parent f7913fd commit 69a19e8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion models/mongodb/model/ImagingStudy.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ module.exports = function (mongodb) {
}
next();
});
fs.writeFileSync("./data/imagingstudySchema.json" ,JSON.stringify (ImagingStudySchema.jsonSchema() , null ,4) , {flag: "w+"});
// fs.writeFileSync("./data/imagingstudySchema.json" ,JSON.stringify (ImagingStudySchema.jsonSchema() , null ,4) , {flag: "w+"});
const ImagingStudy = mongodb.model('ImagingStudy', ImagingStudySchema);
return ImagingStudy;
}
Expand Down
2 changes: 1 addition & 1 deletion models/mongodb/model/endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module.exports = function (mongodb) {
delete result.__v;
return result;
}
fs.writeFileSync("./data/endpoint.json" ,JSON.stringify (endpointSchema.jsonSchema() , null ,4) , {flag: "w+"});
//fs.writeFileSync("./data/endpoint.json" ,JSON.stringify (endpointSchema.jsonSchema() , null ,4) , {flag: "w+"});
let endpoint = mongodb.model('endpoint', endpointSchema , 'endpoint');
return endpoint;
}
Expand Down
2 changes: 1 addition & 1 deletion models/mongodb/model/organization.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module.exports = function (mongodb) {
}
return result;
})
fs.writeFileSync("./data/organization.json", JSON.stringify(organizationSchema.jsonSchema(), null, 4), { flag: "w+" });
//fs.writeFileSync("./data/organization.json", JSON.stringify(organizationSchema.jsonSchema(), null, 4), { flag: "w+" });
const organization = mongodb.model('organization', organizationSchema, 'organization');
return organization;
};
Expand Down
2 changes: 1 addition & 1 deletion models/mongodb/model/patients.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ module.exports = function(mongodb) {
}
return result;
})
fs.writeFileSync("./data/patient.json" ,JSON.stringify (patientsSchema.jsonSchema() , null ,4) , {flag: "w+"});
//fs.writeFileSync("./data/patient.json" ,JSON.stringify (patientsSchema.jsonSchema() , null ,4) , {flag: "w+"});
const patients = mongodb.model('patients', patientsSchema);
return patients;
};
Expand Down

0 comments on commit 69a19e8

Please sign in to comment.