fix(coolify): use correct /deployments/applications/{uuid} endpoint
Made-with: Cursor
This commit is contained in:
@@ -454,7 +454,11 @@ export async function getDeploymentLogs(deploymentUuid: string): Promise<{ logs:
|
||||
}
|
||||
|
||||
export async function listApplicationDeployments(uuid: string): Promise<CoolifyDeployment[]> {
|
||||
return coolifyFetch(`/applications/${uuid}/deployments`);
|
||||
// Coolify v4 nests this under /deployments/applications/{uuid}
|
||||
// and returns { count, deployments }. Normalize to a flat array.
|
||||
const raw = await coolifyFetch(`/deployments/applications/${uuid}?take=50`);
|
||||
if (Array.isArray(raw)) return raw as CoolifyDeployment[];
|
||||
return (raw?.deployments ?? []) as CoolifyDeployment[];
|
||||
}
|
||||
|
||||
// ──────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user