fix
This commit is contained in:
parent
485316c576
commit
e6dd0a8995
@ -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
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user