Double confirmation for anime deletes

This commit is contained in:
Eduard Urbach 2018-03-26 21:54:53 +02:00
parent cc16976ecb
commit 6cd8f725ae

View File

@ -19,6 +19,13 @@ export function deleteObject(arn: AnimeNotifier, button: HTMLButtonElement) {
return
}
// Double confirmation on anime
if(confirmType === "anime") {
if(!confirm(`Just making sure because this is not reversible. Are you absolutely sure you want to delete this ${confirmType}?`)) {
return
}
}
let endpoint = arn.findAPIEndpoint(button)
arn.post(endpoint + "/delete", "")