Merge branch 'master' into wal/front/listingUsers
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m59s
Build and test backend / Test-backend (pull_request) Successful in 2m0s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 24s

This commit is contained in:
2024-03-15 22:49:26 +01:00
17 changed files with 329 additions and 68 deletions

View File

@ -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, restPost } 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");
}
/**
@ -29,13 +29,13 @@ export async function createRegister(){
*/
export async function getRegisters(id){
if(id != null)
return restGet("/requests/register/" + id);
return restGet("/requests/register")
return restGet("/request/register/" + id);
return restGet("/request/register")
}
/**
* 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});
}