1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-26 15:29: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 /// Sign in user
pub fn login_user(request: &mut HttpRequestHandler) -> RequestResult { pub fn login_user(request: &mut HttpRequestHandler) -> RequestResult {
// TODO : remove fallbacks let email = request.post_email("mail")?;
let email = request.post_string_with_fallback("mail", "userMail")?; let password = request.post_string("password")?;
let password = request.post_string_with_fallback("password", "userPassword")?;
if !mailchecker::is_valid(&email) { if !mailchecker::is_valid(&email) {
request.bad_request("Invalid email!".to_string())?; request.bad_request("Invalid email!".to_string())?;