demobank-ui: fix request URIs

This commit is contained in:
Florian Dold 2023-02-26 14:57:56 +01:00
parent 4dff3853c1
commit 3e8562456d
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -60,7 +60,7 @@ export function useAccessAPI(): AccessAPI {
}; };
const abortWithdrawal = async (id: string): Promise<HttpResponseOk<void>> => { const abortWithdrawal = async (id: string): Promise<HttpResponseOk<void>> => {
const res = await request<void>( const res = await request<void>(
`access-api/accounts/${account}/withdrawals/${id}`, `access-api/accounts/${account}/withdrawals/${id}/abort`,
{ {
method: "POST", method: "POST",
contentType: "json", contentType: "json",
@ -73,7 +73,7 @@ export function useAccessAPI(): AccessAPI {
id: string, id: string,
): Promise<HttpResponseOk<void>> => { ): Promise<HttpResponseOk<void>> => {
const res = await request<void>( const res = await request<void>(
`access-api/accounts/${account}/withdrawals/${id}`, `access-api/accounts/${account}/withdrawals/${id}/confirm`,
{ {
method: "POST", method: "POST",
contentType: "json", contentType: "json",