....
This commit is contained in:
16
actix_mvc_app/src/routes/mod.rs
Normal file
16
actix_mvc_app/src/routes/mod.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use actix_web::web;
|
||||
use crate::controllers::home::HomeController;
|
||||
|
||||
/// Configures all application routes
|
||||
pub fn configure_routes(cfg: &mut web::ServiceConfig) {
|
||||
cfg.service(
|
||||
web::scope("")
|
||||
// Home routes
|
||||
.route("/", web::get().to(HomeController::index))
|
||||
.route("/about", web::get().to(HomeController::about))
|
||||
.route("/contact", web::get().to(HomeController::contact))
|
||||
.route("/contact", web::post().to(HomeController::submit_contact))
|
||||
|
||||
// Add more routes here as needed
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user