Modifica la definición de apps como un módulo más
This commit is contained in:
parent
61813a44e5
commit
5c65642ec0
13 changed files with 384 additions and 137 deletions
|
|
@ -1,24 +1,31 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
pub_const_handler!(APP_DRUST);
|
||||
|
||||
struct Drust;
|
||||
|
||||
impl AppTrait for Drust {
|
||||
fn enable_modules(&self) -> Vec<ModuleStaticRef> {
|
||||
impl ModuleTrait for Drust {
|
||||
fn handler(&self) -> Handler {
|
||||
APP_DRUST
|
||||
}
|
||||
|
||||
fn dependencies(&self) -> Vec<ModuleStaticRef> {
|
||||
vec![
|
||||
&pagetop_admin::Admin,
|
||||
&pagetop_user::User,
|
||||
&pagetop_node::Node,
|
||||
&pagetop::base::module::homepage::DefaultHomePage,
|
||||
]
|
||||
}
|
||||
|
||||
fn disable_modules(&self) -> Vec<ModuleStaticRef> {
|
||||
fn uninstall_modules(&self) -> Vec<ModuleStaticRef> {
|
||||
vec![
|
||||
// &pagetop_node::Node,
|
||||
// &pagetop_node::Node
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
#[actix_web::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
Application::prepare(Drust).await?.run()?.await
|
||||
Application::prepare(&Drust).await?.run()?.await
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue