Confirm before deleting post

This commit is contained in:
silverpill 2022-06-03 13:10:32 +00:00
parent f1add10c22
commit ff9a4e396a

View file

@ -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 = []