Skip to content

Commit

Permalink
feat: remove method that response empty when create and update
Browse files Browse the repository at this point in the history
This is hack way to pass test script.
The right method is always response created and updated document in body
  • Loading branch information
Chinlinlee committed Oct 29, 2021
1 parent eb9e361 commit 56f8358
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
5 changes: 1 addition & 4 deletions api/FHIRApiService/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ module.exports = async function(req, res , resourceType) {
try {
let resFunc = {
"true": (doc) => {
if (process.env.ENABLE_RESPONSE_RESOURCE_WHEN_CREATE == "true") {
return doRes(201 , doc);
}
return res.status(201).send();
return doRes(201 , doc);
},
"false": (err) => {
let operationOutcomeMessage;
Expand Down
5 changes: 1 addition & 4 deletions api/FHIRApiService/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ module.exports = async function (req, res, resourceType) {
}
let resFunc = {
"true": (data) => {
if (process.env.ENABLE_RESPONSE_RESOURCE_WHEN_CREATE == "true") {
return doRes(data.code, data.doc);
}
return res.status(data.code).send();
return doRes(data.code, data.doc);
},
"false": (err) => {
let operationOutcomeMessage;
Expand Down
1 change: 0 additions & 1 deletion build/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ ADMIN_USERNAME="admin"
ADMIN_PASSWORD="password"
ENABLE_CHECK_ALL_RESOURCE_ID=false
ENABLE_RESPONSE_RESOURCE_WHEN_CREATE=true
`;
fs.writeFileSync(".env" , envText);
console.log("Please config dotenv file first, the example dotenv file generated in root path");
Expand Down

0 comments on commit 56f8358

Please sign in to comment.