Skip to content

Commit

Permalink
fix: not handle convert XML to JSON when content is XML which using PUT
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinlinlee committed Oct 26, 2021
1 parent 672fb63 commit 543f7b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion API_Generator_V2.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ function generateAPI(option) {
if (req.headers["content-type"]) {
if (req.headers["content-type"].includes("xml")) {
res.set('Content-Type', 'application/fhir+xml');
if (req.method == "POST") {
if (req.method == "POST" || req.method == "PUT") {
let Fhir = new FHIR();
req.body = Fhir.xmlToObj(req.body);
}
Expand Down

0 comments on commit 543f7b7

Please sign in to comment.