paginate launcher source and build history
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-07-07 09:24:31 +09:00
parent 448eadfa2b
commit 56ff75cc5a
2 changed files with 38 additions and 17 deletions
+20 -1
View File
@@ -239,7 +239,26 @@ export function listLauncherBuildJobs(options?: {
if (options?.limit) params.set('limit', String(options.limit));
if (options?.since) params.set('since', options.since);
const query = params.toString() ? `?${params.toString()}` : '';
return apiRequest<LauncherBuildJob[]>(`/launcher/builds${query}`);
if (query) {
return apiRequest<{ jobs: LauncherBuildJob[]; total: number; page: number; limit: number }>(`/launcher/builds${query}`)
.then((result) => result.jobs);
}
return apiRequest<LauncherBuildJob[]>('/launcher/builds');
}
export function listLauncherBuildJobsPage(options: {
target: string;
page: number;
limit: number;
since?: string;
}) {
const params = new URLSearchParams({
target: options.target,
page: String(options.page),
limit: String(options.limit)
});
if (options.since) params.set('since', options.since);
return apiRequest<{ jobs: LauncherBuildJob[]; total: number; page: number; limit: number }>(`/launcher/builds?${params.toString()}`);
}
export function getLauncherBackendDeployment() {