summaryrefslogtreecommitdiff
path: root/src/http/tpl/unsubscribe.html
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2023-08-25 21:04:59 +0200
committerBrian Picciano <mediocregopher@gmail.com>2023-08-25 21:12:57 +0200
commit78bbfa42fa1159bce12c2c1d29eeb0bb9a8a2f75 (patch)
tree041dd938346eddf0a4bcd098403c229555a654cb /src/http/tpl/unsubscribe.html
parentc4ec9064063f3b15aeb25feb85a3afaaa02008ba (diff)
Remove mailinglist and proof-of-work functionality
Diffstat (limited to 'src/http/tpl/unsubscribe.html')
-rw-r--r--src/http/tpl/unsubscribe.html44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/http/tpl/unsubscribe.html b/src/http/tpl/unsubscribe.html
deleted file mode 100644
index ad01735..0000000
--- a/src/http/tpl/unsubscribe.html
+++ /dev/null
@@ -1,44 +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 unsubToken = urlParams.get('unsubToken');
-
- if (!unsubToken) throw "No unsubscribe token provided";
-
- const api = await import("{{ StaticURL "api.js" }}");
-
- await api.call('/api/mailinglist/unsubscribe', {
- body: { unsubToken },
- });
-
- resultSpan.className = "success";
- resultSpan.innerHTML = "You have been unsubscribed! Please go on about your day.";
-
- } catch (e) {
- resultSpan.className = "fail";
- resultSpan.innerHTML = e;
- }
-
-})();
-
-</script>
-
-{{ end }}
-
-{{ template "base.html" . }}