forked from mystiq/hydrogen-web
Use object instead of Record here
This commit is contained in:
parent
e2abc312d3
commit
734ecccb9c
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ export type EncodedBody = {
|
|||
body: BlobHandle | string;
|
||||
}
|
||||
|
||||
export function encodeQueryParams(queryParams?: Record<string, any>): string {
|
||||
export function encodeQueryParams(queryParams?: object): string {
|
||||
return Object.entries(queryParams || {})
|
||||
.filter(([, value]) => value !== undefined)
|
||||
.map(([name, value]) => {
|
||||
|
@ -34,7 +34,7 @@ export function encodeQueryParams(queryParams?: Record<string, any>): string {
|
|||
.join("&");
|
||||
}
|
||||
|
||||
export function encodeBody(body: BlobHandle | Record<string, any>): EncodedBody {
|
||||
export function encodeBody(body: BlobHandle | object): EncodedBody {
|
||||
if (body instanceof BlobHandle) {
|
||||
const blob = body as BlobHandle;
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue