summaryrefslogtreecommitdiff
path: root/src/http/tpl/finalize.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/tpl/finalize.html')
-rw-r--r--src/http/tpl/finalize.html45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/http/tpl/finalize.html b/src/http/tpl/finalize.html
deleted file mode 100644
index 8bdfceb..0000000
--- a/src/http/tpl/finalize.html
+++ /dev/null
@@ -1,45 +0,0 @@
-{{ define "body" }}
-
-<script async type="module" src="{{ StaticURL "api.js" }}"></script>
-
-<style>
-#result.success { color: green; }
-#result.fail { color: red; }
-</style>
-
-<span id="result"></span>
-
-<script>
-
-(async () => {
-
- const resultSpan = document.getElementById("result");
-
- try {
-
- const urlParams = new URLSearchParams(window.location.search);
- const subToken = urlParams.get('subToken');
-
- if (!subToken) throw "No subscription token provided";
-
- const api = await import("{{ StaticURL "api.js" }}");
-
- await api.call('/api/mailinglist/finalize', {
- body: { subToken },
- });
-
- resultSpan.className = "success";
- resultSpan.innerHTML = "Your email subscription has been finalized! Please go on about your day.";
-
- } catch (e) {
- resultSpan.className = "fail";
- resultSpan.innerHTML = e;
- }
-
-})();
-
-</script>
-
-{{ end }}
-
-{{ template "base.html" . }}