passing max ukvisajobs

This commit is contained in:
DaKheera47
2025-12-26 20:47:28 +00:00
parent 878a2f0f54
commit bd7baafbec
9 changed files with 100 additions and 13 deletions
+9 -8
View File
@@ -2,10 +2,10 @@
* API client for the orchestrator backend.
*/
import type {
Job,
ApiResponse,
JobsListResponse,
import type {
Job,
ApiResponse,
JobsListResponse,
PipelineStatusResponse,
JobSource,
PipelineRun,
@@ -26,13 +26,13 @@ async function fetchApi<T>(
...options?.headers,
},
});
const data: ApiResponse<T> = await response.json();
if (!data.success) {
throw new Error(data.error || 'API request failed');
}
return data.data as T;
}
@@ -47,7 +47,7 @@ export async function getJob(id: string): Promise<Job> {
}
export async function updateJob(
id: string,
id: string,
update: Partial<Job>
): Promise<Job> {
return fetchApi<Job>(`/jobs/${id}`, {
@@ -105,6 +105,7 @@ export async function updateSettings(update: {
pipelineWebhookUrl?: string | null
jobCompleteWebhookUrl?: string | null
resumeProjects?: ResumeProjectsSettings | null
ukvisajobsMaxJobs?: number | null
}): Promise<AppSettings> {
return fetchApi<AppSettings>('/settings', {
method: 'PATCH',