From 8541ecceb35971c76b6cb13613597cd07f95d6e0 Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Thu, 13 Aug 2020 13:41:27 -0500 Subject: Remove client JS requirement from /email --- src/html/email-success.html | 22 ++++++++++++++++++++++ src/html/email.html | 13 ------------- src/server.js | 4 ++-- 3 files changed, 24 insertions(+), 15 deletions(-) create mode 100644 src/html/email-success.html diff --git a/src/html/email-success.html b/src/html/email-success.html new file mode 100644 index 0000000..db2dee2 --- /dev/null +++ b/src/html/email-success.html @@ -0,0 +1,22 @@ + + + + + Mark's Kitchen - Email + + + + + + +
+

+ < + Email +

+

Success, thank you!

+
+ + + + \ No newline at end of file diff --git a/src/html/email.html b/src/html/email.html index 13f34d5..cdf1030 100644 --- a/src/html/email.html +++ b/src/html/email.html @@ -6,18 +6,6 @@ - - - @@ -27,7 +15,6 @@ Email

Sign up to receive Mark's email newsletter

-

Success, thank you!

diff --git a/src/server.js b/src/server.js index e62094b..d254722 100644 --- a/src/server.js +++ b/src/server.js @@ -203,7 +203,7 @@ function setUpRoutes(models, jwtFunctions, database) { server.get('/admin', (req, res) => res.sendFile(__dirname + "/html/admin.html")); server.get('/login', (req, res) => res.sendFile(__dirname + "/html/login.html")) server.get('/email', (req, res) => res.sendFile(__dirname + "/html/email.html")) - // server.get('/tags', (req, res) => res.sendFile(__dirname + "/html/tags.html")); + server.get('/email-success', (req, res) => res.sendFile(__dirname + "/html/email-success.html")) server.get('/feed', (req, res) => res.sendFile(__dirname + "/html/feed.html")); server.get('/essay', (req, res) => res.sendFile(__dirname + "/html/essay.html")); server.get('/misc', (req, res) => res.sendFile(__dirname + "/html/misc.html")); @@ -317,7 +317,7 @@ function setUpRoutes(models, jwtFunctions, database) { const email = req.body.email; if (name && email) { models.emails.create({"name": name, "address": email}) - res.redirect('/email#success'); + res.redirect('/email-success'); } else { console.debug("Error with email submission") } -- cgit v1.2.3