👽️ Apply last Handle API changes
This commit is contained in:
parent
68c551bfb3
commit
088ffe7272
10 changed files with 37 additions and 63 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue