mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-12-27 22:18:51 +00:00
Remove resolved TODOs
This commit is contained in:
parent
ddce4062c7
commit
0e80564f85
@ -44,7 +44,6 @@ impl HttpRequestHandler {
|
||||
|
||||
/// Create a new account
|
||||
pub fn create(r: &mut HttpRequestHandler) -> RequestResult {
|
||||
// TODO : limit request
|
||||
|
||||
// Get & check email
|
||||
let email = r.post_email("emailAddress")?;
|
||||
@ -61,8 +60,6 @@ pub fn create(r: &mut HttpRequestHandler) -> RequestResult {
|
||||
|
||||
account_helper::create(&new_account)?;
|
||||
|
||||
// TODO : limit request
|
||||
|
||||
r.success("Account created!")
|
||||
}
|
||||
|
||||
@ -71,8 +68,6 @@ 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
|
||||
let token = account_helper::login_user(
|
||||
&email, &password, request.api_client());
|
||||
@ -82,7 +77,6 @@ pub fn login_user(request: &mut HttpRequestHandler) -> RequestResult {
|
||||
request.set_response(LoginSuccess::new(&t))
|
||||
}
|
||||
Err(e) => {
|
||||
// TODO : limit request
|
||||
println!("Error on login: {}", e);
|
||||
request.forbidden("Invalid email address / password!".to_string())
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ pub fn get_routes() -> Vec<Route> {
|
||||
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/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
|
||||
|
Loading…
Reference in New Issue
Block a user