diff options
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 |
