👽️ Apply last Handle API changes

This commit is contained in:
Manuel Cillero 2023-11-03 22:50:06 +01:00
parent 68c551bfb3
commit 088ffe7272
10 changed files with 37 additions and 63 deletions

View file

@ -1,14 +1,10 @@
use pagetop::prelude::*;
new_handle!(APP_HELLO_NAME);
struct HelloName;
impl ModuleTrait for HelloName {
fn handle(&self) -> Handle {
APP_HELLO_NAME
}
impl_handle!(APP_HELLO_NAME for HelloName);
impl ModuleTrait for HelloName {
fn configure_service(&self, scfg: &mut service::web::ServiceConfig) {
scfg.service(hello_name);
}

View file

@ -1,14 +1,10 @@
use pagetop::prelude::*;
new_handle!(APP_HELLO_WORLD);
struct HelloWorld;
impl ModuleTrait for HelloWorld {
fn handle(&self) -> Handle {
APP_HELLO_WORLD
}
impl_handle!(APP_HELLO_WORLD for HelloWorld);
impl ModuleTrait for HelloWorld {
fn configure_service(&self, scfg: &mut service::web::ServiceConfig) {
scfg.route("/", service::web::get().to(hello_world));
}