diff options
| author | ivar <i@oiee.no> | 2025-12-04 00:17:16 +0100 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2025-12-04 00:17:16 +0100 |
| commit | 724860c272afb7fe5a02645ef1c1b8d208d897f3 (patch) | |
| tree | df9b72b9cd9cc716ceb19a4a9085b8f1ba5b6972 /api/WhatApi/Templates/TemplateFulfiller.cs | |
| parent | 401226a14f3e5ef98b959e818d37683afd7056d9 (diff) | |
| download | what-724860c272afb7fe5a02645ef1c1b8d208d897f3.tar.xz what-724860c272afb7fe5a02645ef1c1b8d208d897f3.zip | |
POC auth in app
Diffstat (limited to 'api/WhatApi/Templates/TemplateFulfiller.cs')
| -rw-r--r-- | api/WhatApi/Templates/TemplateFulfiller.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/api/WhatApi/Templates/TemplateFulfiller.cs b/api/WhatApi/Templates/TemplateFulfiller.cs index 19d3bde..3433701 100644 --- a/api/WhatApi/Templates/TemplateFulfiller.cs +++ b/api/WhatApi/Templates/TemplateFulfiller.cs @@ -8,6 +8,7 @@ public class TemplateFulfiller private static readonly string TemplateDirectory = Path.Combine(Directory.GetCurrentDirectory(), "Templates"); private static string WebMapTemplate => File.ReadAllText(Path.Combine(TemplateDirectory, "web_map.liquid")); private static string WebUploadTemplate => File.ReadAllText(Path.Combine(TemplateDirectory, "web_upload.liquid")); + private static string WebLoginTemplate => File.ReadAllText(Path.Combine(TemplateDirectory, "web_login.liquid")); public static string WebMapPage(object? data = null) { Parser.TryParse(WebMapTemplate, out var template); @@ -20,4 +21,9 @@ public class TemplateFulfiller var context = data is null ? new TemplateContext() : new TemplateContext(data); return template.Render(context); } + public static string WebLoginPage(object? data = null) { + Parser.TryParse(WebLoginTemplate, out var template); + var context = data is null ? new TemplateContext() : new TemplateContext(data); + return template.Render(context); + } }
\ No newline at end of file |
