From b2fa97da060bede62a21470841d62cf7333bb43b Mon Sep 17 00:00:00 2001 From: reza Date: Mon, 17 Aug 2020 21:40:50 +0430 Subject: [PATCH] refactor routes laravel-enso/discussions#6 --- src/bulma/Discussion.vue | 6 +++--- src/bulma/Reactions.vue | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bulma/Discussion.vue b/src/bulma/Discussion.vue index a600f8e..17b9c5e 100644 --- a/src/bulma/Discussion.vue +++ b/src/bulma/Discussion.vue @@ -155,7 +155,7 @@ export default { methods: { store() { - axios.post(this.route('core.discussions.storeReply'), this.reply) + axios.post(this.route('core.discussions.replies.store'), this.reply) .then(({ data }) => { this.discussion.replies.push(data); this.reply = null; @@ -163,12 +163,12 @@ export default { .catch((error) => this.handleErorr(error)); }, update(reply, index) { - axios.patch(this.route('core.discussions.updateReply', reply.id), reply) + axios.patch(this.route('core.discussions.replies.update', reply.id), reply) .then(({ data }) => this.discussion.replies.splice(index, 1, data)) .catch((error) => this.handleErorr(error)); }, destroy(reply, index) { - axios.delete(this.route('core.discussions.destroyReply', reply.id)) + axios.delete(this.route('core.discussions.replies.destroy', reply.id)) .then(() => this.discussion.replies.splice(index, 1)) .catch((error) => this.handleErorr(error)); }, diff --git a/src/bulma/Reactions.vue b/src/bulma/Reactions.vue index 03fc586..4b17712 100644 --- a/src/bulma/Reactions.vue +++ b/src/bulma/Reactions.vue @@ -40,7 +40,7 @@ export default { methods: { react() { - axios.post(this.route('core.discussions.react'), { + axios.post(this.route('core.discussions.reactions.toggle'), { reactableId: this.reactable.id, reactableType: this.type, userId: this.user.id,