You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-08-09 04:22:45 +03:00
Templates config
This commit is contained in:
@@ -68,8 +68,8 @@ impl ServerCommand {
|
||||
queue.start();
|
||||
|
||||
// Load and compile the templates
|
||||
// TODO: custom template path from the config
|
||||
let templates = Templates::load(None, true).context("could not load templates")?;
|
||||
let templates =
|
||||
Templates::load_from_config(&config.templates).context("could not load templates")?;
|
||||
|
||||
// Start the server
|
||||
let root = mas_core::handlers::root(&pool, &templates, &config);
|
||||
|
@@ -41,6 +41,10 @@ enum TemplatesSubcommand {
|
||||
Check {
|
||||
/// Path where the templates are
|
||||
path: String,
|
||||
|
||||
/// Skip loading builtin templates
|
||||
#[clap(long)]
|
||||
skip_builtin: bool,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -54,8 +58,8 @@ impl TemplatesCommand {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
SC::Check { path } => {
|
||||
Templates::load(Some(path.clone()), false)?;
|
||||
SC::Check { path, skip_builtin } => {
|
||||
Templates::load(Some(path), !skip_builtin)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
Reference in New Issue
Block a user