Skip to content

Commit

Permalink
chore: cargo fmt --all
Browse files Browse the repository at this point in the history
  • Loading branch information
Lzyct committed Sep 24, 2024
1 parent 3aac3f1 commit b9449a4
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 31 deletions.
4 changes: 3 additions & 1 deletion src/core/config/routes.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use actix_web::web;

use crate::{
features::{auth::routes::auth_scope, general::routes::general_scope, user::routes::user_scope},
features::{
auth::routes::auth_scope, general::routes::general_scope, user::routes::user_scope,
},
utils::handler::route_not_found,
};

Expand Down
2 changes: 1 addition & 1 deletion src/features/auth/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub mod auth_controller;
pub mod data;
pub mod domain;
pub mod routes;
pub mod routes;
8 changes: 2 additions & 6 deletions src/features/auth/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ pub fn auth_scope() -> actix_web::Scope {
.route(web::post().to(auth_controller::general_token_controller)),
)
.service(
web::resource("/login")
.route(web::post().to(auth_controller::login_contoller)), // Fixed typo: login_contoller -> login_controller
)
.service(
web::resource("/logout")
.route(web::post().to(auth_controller::logout_controller)),
web::resource("/login").route(web::post().to(auth_controller::login_contoller)), // Fixed typo: login_contoller -> login_controller
)
.service(web::resource("/logout").route(web::post().to(auth_controller::logout_controller)))
.service(
web::resource("/session")
.route(web::get().to(auth_controller::login_session_controller)),
Expand Down
2 changes: 1 addition & 1 deletion src/features/general/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pub mod domain;
pub mod general_controller;
pub mod routes;
pub mod routes;
18 changes: 9 additions & 9 deletions src/features/general/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ use actix_web::web;
use super::general_controller;

pub fn general_scope() -> actix_web::Scope {
web::scope("/general")
.service(
web::resource("/send_email")
.route(web::post().to(general_controller::mail_sender_controller)),
)
.service(
web::resource("/health_checker")
.route(web::get().to(general_controller::health_checker_controller)),
)
web::scope("/general")
.service(
web::resource("/send_email")
.route(web::post().to(general_controller::mail_sender_controller)),
)
.service(
web::resource("/health_checker")
.route(web::get().to(general_controller::health_checker_controller)),
)
}
2 changes: 1 addition & 1 deletion src/features/user/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub mod data;
pub mod domain;
pub mod routes;
pub mod user_controller;
pub mod routes;
21 changes: 9 additions & 12 deletions src/features/user/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@ use actix_web::web;
use super::user_controller;

pub fn user_scope() -> actix_web::Scope {
web::scope("/user")
.service(
web::resource("")
.route(web::post().to(user_controller::register_controller))
.route(web::get().to(user_controller::get_user))
.route(web::put().to(user_controller::update_user_controller))
.route(web::delete().to(user_controller::delete_user_controller)),
)
.service(
web::resource("/all")
.route(web::get().to(user_controller::users_controller)),
)
web::scope("/user")
.service(
web::resource("")
.route(web::post().to(user_controller::register_controller))
.route(web::get().to(user_controller::get_user))
.route(web::put().to(user_controller::update_user_controller))
.route(web::delete().to(user_controller::delete_user_controller)),
)
.service(web::resource("/all").route(web::get().to(user_controller::users_controller)))
}

0 comments on commit b9449a4

Please sign in to comment.