Browse Source

Fix the API breakage on posting a CfdOrderRequest

Recent PR #175 introduced a breaking change and the UI did not get updated.
upload-correct-windows-binary
Mariusz Klochowicz 3 years ago
parent
commit
1f5083fa65
No known key found for this signature in database GPG Key ID: 470C865699C8D4D
  1. 2
      frontend/src/TakerApp.tsx

2
frontend/src/TakerApp.tsx

@ -41,7 +41,7 @@ interface MarginResponse {
}
async function postCfdOrderRequest(payload: CfdOrderRequestPayload) {
let res = await fetch(`/api/cfd`, { method: "POST", body: JSON.stringify(payload) });
let res = await fetch(`/api/cfd/order`, { method: "POST", body: JSON.stringify(payload) });
if (!res.status.toString().startsWith("2")) {
throw new Error("failed to create new CFD order request: " + res.status + ", " + res.statusText);

Loading…
Cancel
Save