Add log on; fix DotLiquid rendering

This commit is contained in:
2022-04-17 21:30:00 -04:00
parent 98eb2b1785
commit 1897095ff2
15 changed files with 409 additions and 66 deletions

View File

@@ -103,6 +103,8 @@ let initDb args sp = task {
return! System.Threading.Tasks.Task.CompletedTask
}
open DotLiquid
open MyWebLog.ViewModels
[<EntryPoint>]
let main args =
@@ -131,6 +133,12 @@ let main args =
return conn
} |> Async.AwaitTask |> Async.RunSynchronously
let _ = builder.Services.AddSingleton<IConnection> conn
// Set up DotLiquid
let all = [| "*" |]
Template.RegisterSafeType (typeof<Page>, all)
Template.RegisterSafeType (typeof<WebLog>, all)
Template.RegisterSafeType (typeof<DashboardModel>, all)
let app = builder.Build ()