From 2dfa0a0ee08b8e1c4b3dcf32e8a3b727227f42d2 Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Fri, 22 Mar 2024 13:54:52 +0100 Subject: [PATCH] base msg --- frontend/src/Apps/Msg.vue | 37 +++++++++++++++++++++++++++++++++++++ frontend/src/rest/apps.js | 2 ++ frontend/src/rest/msg.js | 25 +++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 frontend/src/Apps/Msg.vue create mode 100644 frontend/src/rest/msg.js diff --git a/frontend/src/Apps/Msg.vue b/frontend/src/Apps/Msg.vue new file mode 100644 index 0000000..feecdbe --- /dev/null +++ b/frontend/src/Apps/Msg.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/frontend/src/rest/apps.js b/frontend/src/rest/apps.js index 99cbc10..b6568e8 100644 --- a/frontend/src/rest/apps.js +++ b/frontend/src/rest/apps.js @@ -9,6 +9,7 @@ import Profil from "@/Apps/Profil.vue" import Courses from "@/Apps/ManageCourses.vue" import Users from "@/Apps/UsersList.vue" import Students from "@/Apps/StudentsList.vue" +import Msg from "@/Apps/Msg.vue" const apps = { '/login': LoginPage, @@ -17,6 +18,7 @@ const apps = { '/manage-courses' : Courses, '/users-list' : Users, '/students-list' : Students, + '/msg' : Msg, } const appsList = { diff --git a/frontend/src/rest/msg.js b/frontend/src/rest/msg.js new file mode 100644 index 0000000..648f231 --- /dev/null +++ b/frontend/src/rest/msg.js @@ -0,0 +1,25 @@ +/******************************************************* + * File: msg.js + * Author: Anthony Debucquoy + * Scope: Extension messagerie + * Description: Messages frontend api consumer + *******************************************************/ + +import { restGet } from './restConsumer.js' + +export async function getDiscussions(){ + return [ + { + id: 1, + name: "Discussion#1", + members: [1, 2, 3, 4], + }, + { + id: 2, + name: "Discussion#2", + members: [1, 4], + } + ] + return restGet("/discussions"); +} +