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))
|
.catch(err => arn.statusMessage.showError(err))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create thread
|
// Delete post
|
||||||
export function deletePost(arn: AnimeNotifier, element: HTMLElement) {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let endpoint = arn.findAPIEndpoint(element)
|
let endpoint = arn.findAPIEndpoint(element)
|
||||||
|
|
||||||
arn.post(endpoint + "/delete", "")
|
arn.post(endpoint + "/delete", "")
|
||||||
.then(() => arn.reloadContent())
|
.then(() => arn.reloadContent())
|
||||||
.catch(err => arn.statusMessage.showError(err))
|
.catch(err => arn.statusMessage.showError(err))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Forum reply
|
// Forum reply
|
||||||
|
Loading…
Reference in New Issue
Block a user