fix
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 1m58s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 25s

This commit is contained in:
Debucquoy Anthony 2024-03-13 13:18:24 +01:00
parent 485316c576
commit e6dd0a8995
Signed by: tonitch
GPG Key ID: A78D6421F083D42E

View File

@ -7,18 +7,17 @@ export async function login(user, pass, exp){
/** /**
* Register a user (tokenless) * Register a user (tokenless)
* *
* @param data object containing info about the user * @param firstname
* * @param lastname
* - firstname * @param birthdate
* - lastname * @param password
* - birthdate * @param mail
* - password * @param address
* - mail * @param country
* - address * @param cursus
* - country * @param imageId id of the image in database returned when uploaded
* - cursus
*/ */
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", { return restPost("/register", {
firstname: firstname, firstname: firstname,
lastname: lastname, lastname: lastname,
@ -34,21 +33,19 @@ export async function register(firstname, lastname, birthDate, password, email,
/** /**
* Register a user (by secretary) * Register a user (by secretary)
* *
* @param data object containing info about the user * @param firstname
* * @param lastname
* - firstname * @param birthdate
* - lastname * @param password
* - birthdate * @param mail
* - password * @param address
* - mail * @param country
* - address * @param imageId id of the image in database returned when uploaded
* - country
* - cursus
* *
* PS: the password is not is not required as it is generated by the backend and sent to the user * 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 * 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", { return restPost("/user", {
firstname: firstname, firstname: firstname,
lastname: lastname, lastname: lastname,
@ -57,7 +54,6 @@ export async function createUser(firstname, lastname, birthDate, email, address,
email: email, email: email,
address: address, address: address,
country: country, country: country,
cursus:cursus
}); });
} }