mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
Change object to Record
This commit is contained in:
parent
9b315d1564
commit
2dd050bd90
@ -23,7 +23,7 @@ export interface IEncodedBody {
|
||||
length: number;
|
||||
}
|
||||
|
||||
export function encodeQueryParams(queryParams?: object): string {
|
||||
export function encodeQueryParams(queryParams?: Record<string, any>): string {
|
||||
return Object.entries(queryParams || {})
|
||||
.filter(([, value]) => value !== undefined)
|
||||
.map(([name, value]) => {
|
||||
@ -35,7 +35,7 @@ export function encodeQueryParams(queryParams?: object): string {
|
||||
.join("&");
|
||||
}
|
||||
|
||||
export function encodeBody(body: {}): IEncodedBody {
|
||||
export function encodeBody(body: Record<string, any>): IEncodedBody {
|
||||
// todo: code change here
|
||||
if (body instanceof BlobHandle) {
|
||||
const blob = body as BlobHandle;
|
||||
|
Loading…
Reference in New Issue
Block a user