Fix removeBackup function after 2021.9 (#9938)

This commit is contained in:
Joakim Sørensen 2021-09-02 22:13:11 +02:00 committed by GitHub
parent 1692f9c2dd
commit d5a161769c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
} }