From e84e34d735f182e379c270048c8626b67a1b7068 Mon Sep 17 00:00:00 2001 From: Wawilski Date: Sat, 16 Mar 2024 12:47:49 +0100 Subject: [PATCH] login --- frontend/src/Apps/Login.vue | 10 ++++++---- frontend/src/rest/curriculum.js | 6 +++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/frontend/src/Apps/Login.vue b/frontend/src/Apps/Login.vue index fbe4bea..25be792 100644 --- a/frontend/src/Apps/Login.vue +++ b/frontend/src/Apps/Login.vue @@ -2,6 +2,7 @@ import { ref } from 'vue' import i18n from '@/i18n.js' import { login , register } from '@/rest/Users.js' + import { getAllCurriculums } from '@/rest/curriculum.js' import { uploadProfilePicture } from '@/rest/uploads.js' import {toast} from 'vue3-toastify' import 'vue3-toastify/dist/index.css'; @@ -24,8 +25,10 @@ const imageSaved = ref(false) const ppData = ref(false) + const curricula=getAllCurriculums(); + function goBackHome(){ - window.location.href='#home' + window.location.href='#/home' } function verifyInputs(){ @@ -122,9 +125,8 @@

{{i18n("curriculum").toUpperCase()}}

diff --git a/frontend/src/rest/curriculum.js b/frontend/src/rest/curriculum.js index 4aa6d8f..ae1db8e 100644 --- a/frontend/src/rest/curriculum.js +++ b/frontend/src/rest/curriculum.js @@ -2,7 +2,7 @@ * curriculum API */ -import { restGet, restPostn, restDelete, restPatch } from './restConsumer.js' +import { restGet, restPost, restDelete, restPatch } from './restConsumer.js' /** * Create a new curriculum (bundle of courses) @@ -19,6 +19,10 @@ export async function deletecurriculum(id){ return restDelete("/curriculum/" + id); } +export async function getAllCurriculums(){ + return restGet("/curriculum"); +} + /** * Get informations on a particular curriculum *