mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
26 lines
552 B
JavaScript
26 lines
552 B
JavaScript
import gql from 'graphql-tag'
|
|
|
|
export default {
|
|
methods: {
|
|
async confirmCallback() {
|
|
try {
|
|
var gqlMutation = gql`
|
|
mutation($id: ID!) {
|
|
DeletePost(id: $id) {
|
|
id
|
|
}
|
|
}
|
|
`
|
|
await this.$apollo.mutate({
|
|
mutation: gqlMutation,
|
|
variables: { id: this.post.id }
|
|
})
|
|
this.$toast.success(this.$t(`delete.contribution.success`))
|
|
this.$emit('delete')
|
|
} catch (err) {
|
|
this.$toast.error(err.message)
|
|
}
|
|
}
|
|
}
|
|
}
|