1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-23 22:09:22 +00:00
comunicapiv3/src/controllers/account_controller.rs

19 lines
450 B
Rust
Raw Normal View History

2020-05-21 13:43:53 +00:00
use crate::data::http_request_handler::HttpRequestHandler;
use crate::controllers::routes::RequestResult;
/// Account controller
///
/// @author Pierre Hubert
/// Sign in user
2020-05-23 15:09:28 +00:00
pub fn login_user(request: &mut HttpRequestHandler) -> RequestResult {
let email = request.post_email("userMail")?;
let password = request.post_string_opt("userPassword", 3, true)?;
// TODO : limit request
// Authenticate user
request.success("")
2020-05-21 13:43:53 +00:00
}