mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 20:27:43 +00:00
Fix DigitalOcean getApps case where there are no apps
This commit is contained in:
@@ -870,7 +870,7 @@ const getAppsDigitalOceanAppPlatform = async ({ accessToken }: { accessToken: st
|
|||||||
value: string;
|
value: string;
|
||||||
scope: string;
|
scope: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = (
|
const res = (
|
||||||
await standardRequest.get(`${INTEGRATION_DIGITAL_OCEAN_API_URL}/v2/apps`, {
|
await standardRequest.get(`${INTEGRATION_DIGITAL_OCEAN_API_URL}/v2/apps`, {
|
||||||
headers: {
|
headers: {
|
||||||
@@ -879,13 +879,11 @@ const getAppsDigitalOceanAppPlatform = async ({ accessToken }: { accessToken: st
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
).data;
|
).data;
|
||||||
|
|
||||||
const apps = res.apps.map((a: DigitalOceanApp) => ({
|
return (res.apps ?? []).map((a: DigitalOceanApp) => ({
|
||||||
name: a.spec.name,
|
name: a.spec.name,
|
||||||
appId: a.id
|
appId: a.id
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return apps;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user