Max/Backend/Curriculum #106
@ -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});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user
un peu weird le crochet fermant sans ouverture
écoute ct déjà là avant mais je vais retirer ça de suite
Tu me demandes de review je le fait la si on avait laisser passer ca m'aurait niqué pour le front si j'utilisais la function alors mieux vaut le faire mtn