fix
This commit is contained in:
		| @ -7,18 +7,17 @@ export async function login(user, pass, exp){ | ||||
| /** | ||||
|  * Register a user (tokenless) | ||||
|  *  | ||||
|  * @param data object containing info about the user | ||||
|  * | ||||
|  * - firstname | ||||
|  * - lastname | ||||
|  * - birthdate | ||||
|  * - password | ||||
|  * - mail | ||||
|  * - address | ||||
|  * - country | ||||
|  * - cursus | ||||
|  * @param firstname | ||||
|  * @param lastname | ||||
|  * @param birthdate | ||||
|  * @param password | ||||
|  * @param mail | ||||
|  * @param address | ||||
|  * @param country | ||||
|  * @param cursus | ||||
|  * @param imageId	id of the image in database returned when uploaded | ||||
|  */ | ||||
| export async function register(firstname, lastname, birthDate, password, email, address, country, cursus){ | ||||
| export async function register(firstname, lastname, birthDate, password, email, address, country, cursus, imageId){ | ||||
| 	return restPost("/register", { | ||||
| 		firstname: firstname, | ||||
| 		lastname: lastname, | ||||
| @ -34,21 +33,19 @@ export async function register(firstname, lastname, birthDate, password, email, | ||||
| /** | ||||
|  * Register a user (by secretary) | ||||
|  *  | ||||
|  * @param data object containing info about the user | ||||
|  * | ||||
|  * - firstname | ||||
|  * - lastname | ||||
|  * - birthdate | ||||
|  * - password | ||||
|  * - mail | ||||
|  * - address | ||||
|  * - country | ||||
|  * - cursus | ||||
|  * @param firstname | ||||
|  * @param lastname | ||||
|  * @param birthdate | ||||
|  * @param password | ||||
|  * @param mail | ||||
|  * @param address | ||||
|  * @param country | ||||
|  * @param imageId	id of the image in database returned when uploaded | ||||
|  * | ||||
|  * PS: the password is not is not required as it is generated by the backend and sent to the user | ||||
|  * by mail. it's up to the user to change it if he cares about security | ||||
|  */ | ||||
| export async function createUser(firstname, lastname, birthDate, email, address, country, cursus, role){ | ||||
| export async function createUser(firstname, lastname, birthDate, email, address, country, role, imageId){ | ||||
| 	return restPost("/user", { | ||||
| 		firstname: firstname, | ||||
| 		lastname: lastname, | ||||
| @ -57,7 +54,6 @@ export async function createUser(firstname, lastname, birthDate, email, address, | ||||
| 		email: email, | ||||
| 		address: address, | ||||
| 		country: country, | ||||
| 		cursus:cursus | ||||
| 	}); | ||||
| } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user