|
@ -9,7 +9,6 @@ function signup({ |
|
|
number, |
|
|
number, |
|
|
password, |
|
|
password, |
|
|
dateofborn, |
|
|
dateofborn, |
|
|
confirmPassword, |
|
|
|
|
|
institutionName, |
|
|
institutionName, |
|
|
gender, |
|
|
gender, |
|
|
state, |
|
|
state, |
|
@ -19,7 +18,7 @@ function signup({ |
|
|
secQuestionAns, |
|
|
secQuestionAns, |
|
|
consent, |
|
|
consent, |
|
|
}) { |
|
|
}) { |
|
|
const body = JSON.stringify({ |
|
|
|
|
|
|
|
|
const body = { |
|
|
username: number, |
|
|
username: number, |
|
|
nickname: name, |
|
|
nickname: name, |
|
|
password: password, |
|
|
password: password, |
|
@ -33,11 +32,14 @@ function signup({ |
|
|
securityanswer: secQuestionAns, |
|
|
securityanswer: secQuestionAns, |
|
|
termsofusage: consent, |
|
|
termsofusage: consent, |
|
|
roles: ["ROLE_CLIENT"], |
|
|
roles: ["ROLE_CLIENT"], |
|
|
}); |
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
console.log(body); |
|
|
|
|
|
|
|
|
Object.entries(body).forEach(([key, value]) => { |
|
|
|
|
|
value == "" && delete body[key] |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
return authClient.post(`/signup`, body); |
|
|
return authClient.post(`/signup`, body); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export { login, signup }; |
|
|
export { login, signup }; |