Skip to content

Commit d7d6854

Browse files
committed
fix(build): fix type assertion
1 parent d248557 commit d7d6854

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

apps/sim/tools/http/request.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const requestTool: ToolConfig<RequestParams, RequestResponse> = {
7070
return allHeaders
7171
},
7272

73-
body: (params: RequestParams) => {
73+
body: ((params: RequestParams) => {
7474
if (params.formData) {
7575
const formData = new FormData()
7676
Object.entries(params.formData).forEach(([key, value]) => {
@@ -90,19 +90,19 @@ export const requestTool: ToolConfig<RequestParams, RequestResponse> = {
9090
) {
9191
// Convert JSON object to URL-encoded string
9292
const urlencoded = new URLSearchParams()
93-
Object.entries(params.body).forEach(([key, value]) => {
93+
Object.entries(params.body as Record<string, unknown>).forEach(([key, value]) => {
9494
if (value !== undefined && value !== null) {
9595
urlencoded.append(key, String(value))
9696
}
9797
})
9898
return urlencoded.toString()
9999
}
100100

101-
return params.body
101+
return params.body as Record<string, any>
102102
}
103103

104104
return undefined
105-
},
105+
}) as (params: RequestParams) => Record<string, any> | string,
106106
},
107107

108108
transformResponse: async (response: Response) => {

apps/sim/tools/http/webhook_request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export const webhookRequestTool: ToolConfig<WebhookRequestParams, RequestRespons
6868
return { ...webhookHeaders, ...userHeaders }
6969
},
7070

71-
body: (params: WebhookRequestParams) => params.body,
71+
body: (params: WebhookRequestParams) => params.body as Record<string, any>,
7272
},
7373

7474
transformResponse: async (response: Response) => {

0 commit comments

Comments
 (0)