7 Commits

Author SHA1 Message Date
eaf7ad0a45 Merge branch 'master' into tonitch/front/serviceInscription
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m57s
Build and test backend / Test-backend (pull_request) Successful in 1m55s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 20s
2024-03-06 23:11:55 +01:00
2b79df4a7b First draft of the register requests api.
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 2m16s
Build and test backend / Test-backend (pull_request) Successful in 1m54s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 21s
I don't think it's currently usable but it serve as a stub for when
backend will support it
2024-03-06 21:21:46 +01:00
e94acfb4e5 package-lock was forgoten
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 2m2s
Build and test backend / Test-backend (pull_request) Successful in 1m51s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 19s
2024-03-05 23:59:12 +01:00
73cc296a49 adding patch to restConsumer
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m57s
Build and test backend / Test-backend (pull_request) Successful in 1m51s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 20s
2024-03-05 19:31:35 +01:00
e17ceab0e6 adding toast on requests
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m51s
Build and test backend / Test-backend (pull_request) Successful in 1m49s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 19s
2024-03-05 14:25:04 +01:00
09d5e1c293 Document rest
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m55s
Build and test backend / Test-backend (pull_request) Successful in 1m50s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 19s
2024-03-05 11:48:04 +01:00
8c2397c4cf Base for rest api utilisation
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m54s
Build and test backend / Test-backend (pull_request) Successful in 1m52s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 20s
The restConsumer will be the base, then I will create a js file per
"object" (for instance there will be users.js with all endpoints for
users using the restConsumer.js)
2024-03-05 00:15:52 +01:00

View File

@ -0,0 +1,35 @@
/**
* functions to handle register requests.
*
* 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'
/**
* 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"});
}
/**
* list all register request in a list of Objects
*/
export async function getRegisters(){
return restGet("/requests/register")
}
/**
* Get info on a particular registering request
*/
export async function getRegisters(id){
return restGet("/requests/register/" + id);
}
/**
* Change the state of a requests.
*/
export async function validateRegister(id, state){
return restPost("/requests/register/" + id, {state: state});
}