mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-02 21:25:45 +00:00
fix: send current app settings with env sync update
This commit is contained in:
@@ -2268,11 +2268,21 @@ const syncSecretsDigitalOceanAppPlatform = async ({
|
|||||||
secrets: any;
|
secrets: any;
|
||||||
accessToken: string;
|
accessToken: string;
|
||||||
}) => {
|
}) => {
|
||||||
|
// get current app settings
|
||||||
|
const appSettings = (
|
||||||
|
await standardRequest.get(`${INTEGRATION_DIGITAL_OCEAN_API_URL}/v2/apps/${integration.appId}`, {
|
||||||
|
headers: {
|
||||||
|
Authorization: `Bearer ${accessToken}`,
|
||||||
|
Accept: "application/json"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
).data.app.spec;
|
||||||
|
|
||||||
await standardRequest.put(
|
await standardRequest.put(
|
||||||
`${INTEGRATION_DIGITAL_OCEAN_API_URL}/v2/apps/${integration.appId}`,
|
`${INTEGRATION_DIGITAL_OCEAN_API_URL}/v2/apps/${integration.appId}`,
|
||||||
{
|
{
|
||||||
spec: {
|
spec: {
|
||||||
name: integration.app,
|
...appSettings,
|
||||||
envs: Object.entries(secrets).map(([key, value]) => ({ key, value }))
|
envs: Object.entries(secrets).map(([key, value]) => ({ key, value }))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2283,7 +2293,7 @@ const syncSecretsDigitalOceanAppPlatform = async ({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sync/push [secrets] to Windmill with name [integration.app]
|
* Sync/push [secrets] to Windmill with name [integration.app]
|
||||||
|
|||||||
Reference in New Issue
Block a user