From 1bff48a4b99c769b6f6a38c974640f3d952b8608 Mon Sep 17 00:00:00 2001 From: Bartha Maxime <231026@umons.ac.be> Date: Fri, 15 Mar 2024 17:09:18 +0100 Subject: [PATCH] changed the frontend API calls to better suit the backend and logic (register => list and register => single item) --- frontend/src/rest/ServiceInscription.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/rest/ServiceInscription.js b/frontend/src/rest/ServiceInscription.js index ee75c3b..aa90768 100644 --- a/frontend/src/rest/ServiceInscription.js +++ b/frontend/src/rest/ServiceInscription.js @@ -3,14 +3,14 @@ * * 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, restPatch} 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("/request/register"}); } /** @@ -24,12 +24,12 @@ export async function getRegisters(){ * Get info on a particular registering request */ export async function getRegisters(id){ - return restGet("/requests/register/" + id); + return restGet("/request/register/" + id); } /** * Change the state of a requests. */ export async function validateRegister(id, state){ - return restPost("/requests/register/" + id, {state: state}); + return restPatch("/request/register/" + id, {state: state}); }