Fixed comment

This commit is contained in:
Eduard Urbach 2017-11-25 15:26:56 +01:00
parent 57188cfd4f
commit 1c23d6d2a5

View File

@ -43,18 +43,17 @@ export function savePost(arn: AnimeNotifier, element: HTMLElement) {
.catch(err => arn.statusMessage.showError(err))
}
// Create thread
// Delete post
export function deletePost(arn: AnimeNotifier, element: HTMLElement) {
if (!confirm(`Are you sure you want to delete this Post?`)) {
if(!confirm(`Are you sure you want to delete this Post?`)) {
return
}
let endpoint = arn.findAPIEndpoint(element)
arn.post(endpoint + "/delete", "")
.then(() => arn.reloadContent())
.catch(err => arn.statusMessage.showError(err))
.then(() => arn.reloadContent())
.catch(err => arn.statusMessage.showError(err))
}
// Forum reply