From cd5419edeaae4a3f137e708b5d8cfcb95aab794c Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Tue, 2 Mar 2021 17:52:11 +0100 Subject: [PATCH] Remove fallbacks --- src/controllers/account_controller.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/controllers/account_controller.rs b/src/controllers/account_controller.rs index f365a6f..9d06c63 100644 --- a/src/controllers/account_controller.rs +++ b/src/controllers/account_controller.rs @@ -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())?;