mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-29 15:57:20 +00:00
Fix removeBackup function after 2021.9 (#9938)
This commit is contained in:
parent
1692f9c2dd
commit
d5a161769c
@ -159,9 +159,11 @@ export const removeBackup = async (hass: HomeAssistant, slug: string) => {
|
|||||||
await hass.callWS({
|
await hass.callWS({
|
||||||
type: "supervisor/api",
|
type: "supervisor/api",
|
||||||
endpoint: `/${
|
endpoint: `/${
|
||||||
atLeastVersion(hass.config.version, 2021, 9) ? "backups" : "snapshots"
|
atLeastVersion(hass.config.version, 2021, 9)
|
||||||
}/${slug}/remove`,
|
? `backups/${slug}`
|
||||||
method: "post",
|
: `snapshots/${slug}/remove`
|
||||||
|
}`,
|
||||||
|
method: atLeastVersion(hass.config.version, 2021, 9) ? "delete" : "post",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user