Some checks failed
Build and test backend / Test-backend (push) Waiting to run
deploy to production / deploy-frontend (push) Waiting to run
deploy to production / deploy-backend (push) Waiting to run
Build and test FrontEnd / Build-frontend (push) Waiting to run
Build and test backend / Build-backend (push) Has been cancelled
I don't think it's currently usable but it serve as a stub for when backend will support it
36 lines
892 B
JavaScript
36 lines
892 B
JavaScript
/**
|
|
* 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});
|
|
}
|