Fixed comment
This commit is contained in:
parent
57188cfd4f
commit
1c23d6d2a5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user