diff options
author | Sebastian <sebasjm@gmail.com> | 2023-08-07 06:51:26 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-08-07 08:14:45 -0300 |
commit | 9f776d3fb0de01c44ca7b6efcdbcf89655a6ac3f (patch) | |
tree | 4fd7549271dbbe7803f892e440010f7070736c60 /packages/merchant-backoffice-ui/src | |
parent | 7d1621767cec57e9e7217f620844655279ab1af5 (diff) | |
download | wallet-core-9f776d3fb0de01c44ca7b6efcdbcf89655a6ac3f.tar.xz |
fix date query parameter
Diffstat (limited to 'packages/merchant-backoffice-ui/src')
-rw-r--r-- | packages/merchant-backoffice-ui/src/hooks/backend.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/merchant-backoffice-ui/src/hooks/backend.ts b/packages/merchant-backoffice-ui/src/hooks/backend.ts index 90fd320a9..145a366f6 100644 --- a/packages/merchant-backoffice-ui/src/hooks/backend.ts +++ b/packages/merchant-backoffice-ui/src/hooks/backend.ts @@ -239,16 +239,16 @@ export function useBackendInstanceRequest(): useBackendInstanceRequestType { searchDate?: Date, delta?: number, ): Promise<HttpResponseOk<T>> { - const date_ms = + const date_s = delta && delta < 0 && searchDate - ? searchDate.getTime() + 1 - : searchDate?.getTime(); + ? (searchDate.getTime() / 1000) + 1 + : searchDate !== undefined ? (searchDate.getTime() / 1000) : undefined; const params: any = {}; if (paid !== undefined) params.paid = paid; if (delta !== undefined) params.delta = delta; if (refunded !== undefined) params.refunded = refunded; if (wired !== undefined) params.wired = wired; - if (date_ms !== undefined) params.date_ms = date_ms; + if (date_s !== undefined) params.date_s = date_s; return requestHandler<T>(baseUrl, endpoint, { params, token }); }, [baseUrl, token], |