Add TimeOfDate handlebars helper
This commit is contained in:
parent
c0efdf8b49
commit
d7b5694188
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user