1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-12-01 17:56:28 +00:00

Remove resolved TODOs

This commit is contained in:
Pierre HUBERT 2021-01-23 09:56:19 +01:00
parent ddce4062c7
commit 0e80564f85
2 changed files with 1 additions and 7 deletions

View File

@ -44,7 +44,6 @@ impl HttpRequestHandler {
/// Create a new account /// Create a new account
pub fn create(r: &mut HttpRequestHandler) -> RequestResult { pub fn create(r: &mut HttpRequestHandler) -> RequestResult {
// TODO : limit request
// Get & check email // Get & check email
let email = r.post_email("emailAddress")?; let email = r.post_email("emailAddress")?;
@ -61,8 +60,6 @@ pub fn create(r: &mut HttpRequestHandler) -> RequestResult {
account_helper::create(&new_account)?; account_helper::create(&new_account)?;
// TODO : limit request
r.success("Account created!") r.success("Account created!")
} }
@ -71,8 +68,6 @@ pub fn login_user(request: &mut HttpRequestHandler) -> RequestResult {
let email = request.post_email("userMail")?; let email = request.post_email("userMail")?;
let password = request.post_string_opt("userPassword", 3, true)?; let password = request.post_string_opt("userPassword", 3, true)?;
// TODO : limit request
// Authenticate user // Authenticate user
let token = account_helper::login_user( let token = account_helper::login_user(
&email, &password, request.api_client()); &email, &password, request.api_client());
@ -82,7 +77,6 @@ pub fn login_user(request: &mut HttpRequestHandler) -> RequestResult {
request.set_response(LoginSuccess::new(&t)) request.set_response(LoginSuccess::new(&t))
} }
Err(e) => { Err(e) => {
// TODO : limit request
println!("Error on login: {}", e); println!("Error on login: {}", e);
request.forbidden("Invalid email address / password!".to_string()) request.forbidden("Invalid email address / password!".to_string())
} }

View File

@ -232,7 +232,7 @@ pub fn get_routes() -> Vec<Route> {
Route::post("/groups/get_membership", Box::new(groups_controller::get_membership)), Route::post("/groups/get_membership", Box::new(groups_controller::get_membership)),
Route::post("/groups/remove_membership", Box::new(groups_controller::remove_membership)), Route::post("/groups/remove_membership", Box::new(groups_controller::remove_membership)),
Route::post("/groups/set_following", Box::new(groups_controller::set_following)), Route::post("/groups/set_following", Box::new(groups_controller::set_following)),
Route::post("/groups/delete", Box::new(groups_controller::delete_group)), Route::limited_post("/groups/delete", Box::new(groups_controller::delete_group), LimitPolicy::FAILURE(10)),
// Posts controller // Posts controller