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 a9a8b66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions public/video-ui/src/services/WorkflowApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,15 @@ export default class WorkflowApi {
prodOffice,
priority
});

return pandaReqwest({
method: 'POST',
url: `${WorkflowApi.workflowUrl}/api/stubs`,
data: payload,
crossOrigin: true,
withCredentials: true
withCredentials: true,
headers: {
"Content-Type": "application/json",

Check failure on line 158 in public/video-ui/src/services/WorkflowApi.js

View workflow job for this annotation

GitHub Actions / CI

Unexpected trailing comma
}
});
}

Expand Down
2 changes: 1 addition & 1 deletion public/video-ui/src/services/pandaReqwest.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const pandaReqwest = (reqwestBody, timeout = 0) => {
// prettier-ignore
if (payload.contentType === 'application/json' && typeof payload.data === 'object') {

payload.data = JSON.stringify(payload.data);
payload.body = JSON.stringify(payload.data);
}
}

Expand Down

0 comments on commit a9a8b66

Please sign in to comment.