fix date query parameter
This commit is contained in:
parent
7d1621767c
commit
9f776d3fb0
@ -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],
|
||||
|
Loading…
Reference in New Issue
Block a user