1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-22 21:39:21 +00:00

Remove fallbacks

This commit is contained in:
Pierre HUBERT 2021-03-02 17:52:11 +01:00
parent f7fbea34ea
commit cd5419edea

View File

@ -68,9 +68,8 @@ pub fn create(r: &mut HttpRequestHandler) -> RequestResult {
/// Sign in user
pub fn login_user(request: &mut HttpRequestHandler) -> RequestResult {
// TODO : remove fallbacks
let email = request.post_string_with_fallback("mail", "userMail")?;
let password = request.post_string_with_fallback("password", "userPassword")?;
let email = request.post_email("mail")?;
let password = request.post_string("password")?;
if !mailchecker::is_valid(&email) {
request.bad_request("Invalid email!".to_string())?;