summaryrefslogtreecommitdiffstats
path: root/api/WhatApi/Templates/TemplateFulfiller.cs
diff options
context:
space:
mode:
authorivar <i@oiee.no>2025-12-04 00:17:16 +0100
committerivar <i@oiee.no>2025-12-04 00:17:16 +0100
commit724860c272afb7fe5a02645ef1c1b8d208d897f3 (patch)
treedf9b72b9cd9cc716ceb19a4a9085b8f1ba5b6972 /api/WhatApi/Templates/TemplateFulfiller.cs
parent401226a14f3e5ef98b959e818d37683afd7056d9 (diff)
downloadwhat-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.cs6
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