Añade módulo User y componentes para formularios

This commit is contained in:
Manuel Cillero 2022-02-20 23:01:11 +01:00
parent 1d438dff57
commit d38df3a5b6
21 changed files with 1228 additions and 26 deletions

View file

@ -9,6 +9,8 @@ use tracing::subscriber::set_global_default;
use tracing_bunyan_formatter::{BunyanFormattingLayer, JsonStorageLayer};
use tracing_actix_web::TracingLogger;
use actix_web::middleware::normalize;
pub fn run(bootstrap: Option<fn()>) -> Result<Server, std::io::Error> {
// Inicia la traza de ejecución de la aplicación.
let env_filter = EnvFilter::try_new(&SETTINGS.log.tracing)
@ -90,6 +92,7 @@ pub fn run(bootstrap: Option<fn()>) -> Result<Server, std::io::Error> {
let server = server::HttpServer::new(|| {
server::App::new()
.wrap(TracingLogger)
.wrap(normalize::NormalizePath::new(normalize::TrailingSlash::Trim))
.configure(&all::themes)
.configure(&all::modules)
})

View file

@ -36,7 +36,9 @@ pub fn register_theme(t: &'static (dyn Theme + 'static)) {
// -----------------------------------------------------------------------------
pub static MODULES: Lazy<RwLock<Vec<&dyn Module>>> = Lazy::new(|| {
RwLock::new(vec![])
RwLock::new(vec![
&base::module::user::UserModule,
])
});
pub fn register_module(m: &'static (dyn Module + 'static)) {