aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAkshay" (aider) <[email protected]>2024-11-09 10:18:19 +0000
committerAkshay" (aider) <[email protected]>2024-11-09 10:18:19 +0000
commiteefb370556b62d0775d6325cca0a3f869346f656 (patch)
tree742215b5f7f54748db866090010315b8c3b2b340 /src
parent1472ae922cac9af0e0d1a48a0ed469fb288a5174 (diff)
feat: Add JWT token handling for registration and login
Diffstat (limited to 'src')
-rw-r--r--src/routes/index.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/routes/index.js b/src/routes/index.js
index 957746e..d517ba2 100644
--- a/src/routes/index.js
+++ b/src/routes/index.js
@@ -1,7 +1,9 @@
1const express = require("express"); 1const express = require("express");
2const he = require("he"); 2const he = require("he");
3const { hash, compare } = require("bun"); 3const { hash, compare } = require("bun");
4const jwt = require("jsonwebtoken");
4const router = express.Router(); 5const router = express.Router();
6const secretKey = "your_secret_key"; // Replace with your actual secret key
5const geddit = require("../geddit.js"); 7const geddit = require("../geddit.js");
6const { db } = require("../index"); 8const { db } = require("../index");
7const G = new geddit.Geddit(); 9const G = new geddit.Geddit();