diff --git a/terminwahl_back/src/main.rs b/terminwahl_back/src/main.rs index a0c08a1..491af93 100644 --- a/terminwahl_back/src/main.rs +++ b/terminwahl_back/src/main.rs @@ -11,7 +11,7 @@ use handlebars::{DirectorySourceOptions, Handlebars}; use lettre::{transport::smtp::authentication::Credentials, AsyncSmtpTransport, Tokio1Executor}; use log::debug; use std::env; -use terminwahl_back::{api, db, views, CssPath}; +use terminwahl_back::{api, db, handlebars_helper::TimeOfDate, views, CssPath}; #[actix_web::main] async fn main() -> std::io::Result<()> { @@ -40,6 +40,7 @@ async fn main() -> std::io::Result<()> { .build(); let mut handlebars = Handlebars::new(); + handlebars.register_helper("time_of", Box::new(TimeOfDate)); let handlebars_source = DirectorySourceOptions { tpl_extension: ".hbs".to_string(), ..Default::default()