Skip to content

Commit

Permalink
fix: update API broken
Browse files Browse the repository at this point in the history
# Problems
- related: 49855f8, I forgot to rename the related code

# Solutions
- rename doc to result
  • Loading branch information
Chinlinlee committed Oct 27, 2023
1 parent 49855f8 commit 4867f30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/FHIRApiService/services/update.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class UpdateService extends BaseFhirApiService {
this.response.set("Location", fullAbsoluteUrl);

this.response.append("Last-Modified", new Date().toUTCString());
return this.doResponse(resource.code, resource.doc);
return this.doResponse(resource.code, resource.result);
}

doFailureResponse(err, code) {
Expand Down
2 changes: 1 addition & 1 deletion api/FHIRApiService/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = async function (req, res, resourceType) {
let updateService = new UpdateService(req, res, resourceType);
let updateResult = await updateService.update();
if (!updateResult.status)
return updateService.doFailureResponse(updateResult.doc, updateResult.code);
return updateService.doFailureResponse(updateResult.result, updateResult.code);

return updateService.doSuccessResponse(updateResult);
};

0 comments on commit 4867f30

Please sign in to comment.