Browse Source

Add template

ghorsington 4 years ago
parent
commit
dac68f1ca7
3 changed files with 10 additions and 2 deletions
  1. 3 1
      .env.template
  2. 1 1
      web/src/routes/index.svelte
  3. 6 0
      web/src/routes/login.ts

+ 3 - 1
.env.template

@@ -16,4 +16,6 @@ ADMIN_URL=
 
 GMAIL_NAME=
 GMAIL_PASSWORD=
-ERRORS_ADDR=
+ERRORS_ADDR=
+
+NOCTBOT_ADDR=

+ 1 - 1
web/src/routes/index.svelte

@@ -6,7 +6,7 @@
 	<div class="bg-gray-800 rounded-sm text-center px-20 py-5 shadow-lg">
 		<h1 class="text-white text-4xl font-light">Login</h1>
 		<p class="px-10 py-5">
-			<a class="text-sm bg-blue-700 hover:bg-blue-800 p-2 text-white hover:text-gray-100 rounded-sm" href="#">Login with Discord</a>
+			<a class="text-sm bg-blue-700 hover:bg-blue-800 p-2 text-white hover:text-gray-100 rounded-sm" href="/login">Login with Discord</a>
 		</p>
 	</div>
 </div>

+ 6 - 0
web/src/routes/login.ts

@@ -0,0 +1,6 @@
+import { Request as ExpressRequest, Response as ExpressResponse } from "express";
+
+export const get = async (req: ExpressRequest, res: ExpressResponse): Promise<void> => {
+    console.log(`referrer: ${req.headers.referer}`);
+    res.redirect("/");
+};