cargo loco generate controller home --htmx
This commit is contained in:
parent
652ead1c2b
commit
c917942591
3 changed files with 13 additions and 1 deletions
|
@ -50,6 +50,7 @@ impl Hooks for App {
|
||||||
|
|
||||||
fn routes(_ctx: &AppContext) -> AppRoutes {
|
fn routes(_ctx: &AppContext) -> AppRoutes {
|
||||||
AppRoutes::with_default_routes()
|
AppRoutes::with_default_routes()
|
||||||
|
.add_route(controllers::home::routes())
|
||||||
.add_route(controllers::service::routes())
|
.add_route(controllers::service::routes())
|
||||||
.add_route(controllers::bundle::routes())
|
.add_route(controllers::bundle::routes())
|
||||||
.add_route(controllers::server::routes())
|
.add_route(controllers::server::routes())
|
||||||
|
|
10
nixin_farm_ssr/src/controllers/home.rs
Normal file
10
nixin_farm_ssr/src/controllers/home.rs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#![allow(clippy::missing_errors_doc)]
|
||||||
|
#![allow(clippy::unnecessary_struct_initialization)]
|
||||||
|
#![allow(clippy::unused_async)]
|
||||||
|
use loco_rs::prelude::*;
|
||||||
|
use axum::debug_handler;
|
||||||
|
|
||||||
|
pub fn routes() -> Routes {
|
||||||
|
Routes::new()
|
||||||
|
.prefix("homes")
|
||||||
|
}
|
|
@ -3,4 +3,5 @@ pub mod user;
|
||||||
|
|
||||||
pub mod server;
|
pub mod server;
|
||||||
pub mod bundle;
|
pub mod bundle;
|
||||||
pub mod service;
|
pub mod service;
|
||||||
|
pub mod home;
|
Loading…
Reference in a new issue