Compare commits
	
		
			7 Commits
		
	
	
		
			JalonB
			...
			eaf7ad0a45
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| eaf7ad0a45 | |||
| 2b79df4a7b | |||
| e94acfb4e5 | |||
| 73cc296a49 | |||
| e17ceab0e6 | |||
| 09d5e1c293 | |||
| 8c2397c4cf | 
							
								
								
									
										35
									
								
								frontend/src/rest/ServiceInscription.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								frontend/src/rest/ServiceInscription.js
									
									
									
									
									
										Normal 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}); | ||||||
|  | } | ||||||
		Reference in New Issue
	
	Block a user