🧑💻 Major update to enhance Handle usage
This commit is contained in:
parent
255fb393a9
commit
d9f3561832
56 changed files with 201 additions and 353 deletions
|
|
@ -1,9 +1,8 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
#[derive(AssignHandle)]
|
||||
struct HelloName;
|
||||
|
||||
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,9 +1,8 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
#[derive(AssignHandle)]
|
||||
struct HelloWorld;
|
||||
|
||||
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