Added activity deletion

This commit is contained in:
2018-11-12 14:52:02 +09:00
parent f711cdb011
commit e44bfd94b7
3 changed files with 28 additions and 1 deletions

View File

@ -29,6 +29,12 @@ export function deleteObject(arn: AnimeNotifier, button: HTMLButtonElement) {
let endpoint = arn.findAPIEndpoint(button)
arn.post(endpoint + "/delete")
.then(() => arn.app.load(returnPath))
.then(() => {
if(returnPath) {
arn.app.load(returnPath)
} else {
arn.reloadContent()
}
})
.catch(err => arn.statusMessage.showError(err))
}