mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-27 23:07: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({
|
||||
type: "supervisor/api",
|
||||
endpoint: `/${
|
||||
atLeastVersion(hass.config.version, 2021, 9) ? "backups" : "snapshots"
|
||||
}/${slug}/remove`,
|
||||
method: "post",
|
||||
atLeastVersion(hass.config.version, 2021, 9)
|
||||
? `backups/${slug}`
|
||||
: `snapshots/${slug}/remove`
|
||||
}`,
|
||||
method: atLeastVersion(hass.config.version, 2021, 9) ? "delete" : "post",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user