From 914f6bdf365e0df43f03086121e428871764c9f8 Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Mon, 25 Mar 2024 09:43:45 +0100 Subject: [PATCH] fix for new discussions not appearing right away --- frontend/src/Apps/Msg.vue | 4 ++-- frontend/src/rest/msg.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/Apps/Msg.vue b/frontend/src/Apps/Msg.vue index 254df1d..433300c 100644 --- a/frontend/src/Apps/Msg.vue +++ b/frontend/src/Apps/Msg.vue @@ -9,7 +9,7 @@ import { ref, reactive } from 'vue' import { getDiscussions, currentDiscussion, fetchDiscussion, createDiscussion } from '@/rest/msg.js' - const discussionsList = ref(await getDiscussions()); + const discussionsList = reactive(await getDiscussions()); @@ -17,7 +17,7 @@
{{ discussion.name }}
- +

{{currentDiscussion.name}}

diff --git a/frontend/src/rest/msg.js b/frontend/src/rest/msg.js index 06c084c..1cecd42 100644 --- a/frontend/src/rest/msg.js +++ b/frontend/src/rest/msg.js @@ -73,7 +73,7 @@ export async function fetchDiscussion(id){ } export async function createDiscussion(name){ - restPost("/discussion", {name: name}); + return restPost("/discussion", {name: name}); }