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