From 08c662a65f082c0f719c2d4ec5838789616acb3c Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Sun, 10 Mar 2024 20:32:23 +0100 Subject: [PATCH] Fetch inscription on backend This commit is waiting for the backend implementation to be merged. The list of field expected is writen in comment --- frontend/src/Apps/Inscription.vue | 30 ++++--------------------- frontend/src/rest/ServiceInscription.js | 26 ++++++++++++--------- 2 files changed, 20 insertions(+), 36 deletions(-) diff --git a/frontend/src/Apps/Inscription.vue b/frontend/src/Apps/Inscription.vue index 0ba7fce..511a403 100644 --- a/frontend/src/Apps/Inscription.vue +++ b/frontend/src/Apps/Inscription.vue @@ -1,32 +1,10 @@ diff --git a/frontend/src/rest/ServiceInscription.js b/frontend/src/rest/ServiceInscription.js index ee75c3b..7048093 100644 --- a/frontend/src/rest/ServiceInscription.js +++ b/frontend/src/rest/ServiceInscription.js @@ -3,28 +3,34 @@ * * TODO: On time of writing, the backend doesn't support these endpoints so it could be modified in the future. */ -import { restGet } from './restConsumer.js' +import { restGet, restPost } from './restConsumer.js' /** * create a new register requests that can be recovered by the registering service * TODO: add info in the Object (I don't know what will be needed) */ export async function createRegister(){ - return restPost("/requests/register"}); + return restPost("/requests/register"); } /** * list all register request in a list of Objects - */ -export async function getRegisters(){ - return restGet("/requests/register") -} - -/** - * Get info on a particular registering request + * Shall return a list of + * - id + * - type + * - lastName + * - firstName + * - address + * - country + * - birthdate + * - email + * - cursus + * - degree */ export async function getRegisters(id){ - return restGet("/requests/register/" + id); + if(id != null) + return restGet("/requests/register/" + id); + return restGet("/requests/register") } /**