Skip to content

Commit

Permalink
Ensure POST requests to workflow still wor
Browse files Browse the repository at this point in the history
  • Loading branch information
rhystmills committed Nov 25, 2024
1 parent 980741a commit a8d68b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion public/video-ui/src/services/WorkflowApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ export default class WorkflowApi {
prodOffice,
priority
});

return pandaReqwest({
method: 'POST',
url: `${WorkflowApi.workflowUrl}/api/stubs`,
Expand Down
10 changes: 8 additions & 2 deletions public/video-ui/src/services/pandaReqwest.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,14 @@ export const pandaReqwest = (reqwestBody, timeout = 0) => {

// prettier-ignore
if (payload.contentType === 'application/json' && typeof payload.data === 'object') {

payload.data = JSON.stringify(payload.data);
if (payload.headers){
payload.headers["Content-Type"] = "application/json";
} else {
payload.headers ={
"Content-Type": "application/json"
};
}
payload.body = JSON.stringify(payload.data);
}
}

Expand Down

0 comments on commit a8d68b0

Please sign in to comment.