1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-09 04:22:45 +03:00

Stop using Utc::now in templates samples

This commit is contained in:
Quentin Gliech
2022-10-24 09:33:24 +02:00
parent 44d09b68e7
commit f0d95a7613
5 changed files with 74 additions and 69 deletions

View File

@@ -15,6 +15,7 @@
use std::path::PathBuf;
use clap::Parser;
use mas_storage::Clock;
use mas_templates::Templates;
#[derive(Parser, Debug)]
@@ -57,10 +58,11 @@ impl Options {
}
SC::Check { path, skip_builtin } => {
let clock = Clock::default();
let url_builder = mas_router::UrlBuilder::new("https://example.com/".parse()?);
let templates =
Templates::load(Some(path.into()), !skip_builtin, url_builder).await?;
templates.check_render().await?;
templates.check_render(clock.now()).await?;
Ok(())
}