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)
*
* @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
});
}