1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

fix(endpoints): use the post method for batch delete API operations [BE-11573] (#397)

This commit is contained in:
viktigpetterr 2025-02-06 18:17:13 +01:00
parent 157c83deee
commit 3e5ec79b21
3 changed files with 28 additions and 6 deletions

View file

@ -55,11 +55,11 @@ async function deleteEnvironments(
environments: { id: EnvironmentId; deleteCluster?: boolean }[]
) {
try {
const { data } = await axios.delete<{
const { data } = await axios.post<{
deleted: EnvironmentId[];
errors: EnvironmentId[];
} | null>(buildUrl(), {
data: { endpoints: environments },
} | null>(buildUrl(undefined, 'delete'), {
endpoints: environments,
});
return data;
} catch (e) {