Add default array for cron http headers (#33255)

This commit is contained in:
Joshen Lim authored and GitHub committed 2025-02-03 15:55:59 +08:00
1 parent 02d943e9d6
commit 1ca992100a
2 files changed
+2 -2

No files matched your search

@@ -17,6 +17,7 @@ import { CronJob, useCronJobsQuery } from 'data/database-cron-jobs/database-cron
import { useDatabaseExtensionsQuery } from 'data/database-extensions/database-extensions-query'
import { useSendEventMutation } from 'data/telemetry/send-event-mutation'
import { useCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
import {
Button,
Form_Shadcn_,
@@ -50,7 +51,6 @@ import { HTTPHeaderFieldsSection } from './HttpHeaderFieldsSection'
import { HttpRequestSection } from './HttpRequestSection'
import { SqlFunctionSection } from './SqlFunctionSection'
import { SqlSnippetSection } from './SqlSnippetSection'
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
export interface CreateCronJobSheetProps {
selectedCronJob?: Pick<CronJob, 'jobname' | 'schedule' | 'active' | 'command'>
@@ -12,7 +12,7 @@ export const buildCronQuery = (name: string, schedule: string, command: string)
export const buildHttpRequestCommand = (
method: 'GET' | 'POST',
url: string,
headers: HTTPHeader[],
headers: HTTPHeader[] = [],
body: string | undefined,
timeout: number
) => {