Confirm before deleting post
This commit is contained in:
parent
f1add10c22
commit
ff9a4e396a
1 changed files with 5 additions and 3 deletions
|
@ -426,10 +426,12 @@ export default class PostComponent extends Vue {
|
||||||
}
|
}
|
||||||
|
|
||||||
async deletePost() {
|
async deletePost() {
|
||||||
|
if (confirm("Are you sure you want to delete this post?")) {
|
||||||
const authToken = this.store.ensureAuthToken()
|
const authToken = this.store.ensureAuthToken()
|
||||||
await deletePost(authToken, this.post.id)
|
await deletePost(authToken, this.post.id)
|
||||||
this.$emit("post-deleted")
|
this.$emit("post-deleted")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
getPaymentOptions(): PaymentOption[] {
|
getPaymentOptions(): PaymentOption[] {
|
||||||
const items = []
|
const items = []
|
||||||
|
|
Loading…
Reference in a new issue