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:
parent
157c83deee
commit
3e5ec79b21
3 changed files with 28 additions and 6 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue