fix: send jobId/jobName instead of command when triggering cron jobs
The triggerJob function was sending { command: job.command } to the API,
but the backend expects jobId or jobName to identify the job. This caused
all manual cron triggers to fail with "Job ID required" (400 error).
Also adds the missing `id` field to the CronJob store interface so
TypeScript recognizes the field already returned by the API.
This commit is contained in:
parent
1544d9f725
commit
b6c6bb955d
|
|
@ -98,7 +98,8 @@ export function CronManagementPanel() {
|
|||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
action: 'trigger',
|
||||
command: job.command
|
||||
jobId: job.id,
|
||||
jobName: job.name,
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ export interface LogEntry {
|
|||
}
|
||||
|
||||
export interface CronJob {
|
||||
id?: string
|
||||
name: string
|
||||
schedule: string
|
||||
command: string
|
||||
|
|
|
|||
Loading…
Reference in New Issue