aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <andrew@alee14.me>2024-12-24 17:34:23 -0500
committerAndrew Lee <andrew@alee14.me>2024-12-24 17:34:23 -0500
commit39cbc8c286227eca935248ad9237d66fa6f45f6e (patch)
treebc7eb63a91537b6a173a61282d8acce5206a1422
parent12669097d86af780fdf4bec629aa81ba15b7c116 (diff)
downloadfreeso-discord-auth-39cbc8c286227eca935248ad9237d66fa6f45f6e.tar.gz
freeso-discord-auth-39cbc8c286227eca935248ad9237d66fa6f45f6e.tar.bz2
freeso-discord-auth-39cbc8c286227eca935248ad9237d66fa6f45f6e.zip
Changed discord usernames to id as they are permanent unlike username which can be changed
-rwxr-xr-xbun.lockbbin125899 -> 91866 bytes
-rw-r--r--index.js4
-rw-r--r--package.json3
3 files changed, 3 insertions, 4 deletions
diff --git a/bun.lockb b/bun.lockb
index 43e8e7a..fd95491 100755
--- a/bun.lockb
+++ b/bun.lockb
Binary files differ
diff --git a/index.js b/index.js
index c06f88a..1e03b94 100644
--- a/index.js
+++ b/index.js
@@ -95,7 +95,7 @@ app.get("/", async (req, res) => {
app.post("/register", upload.none(), async (req, res) => {
if (req.isAuthenticated()) {
- const { username: discordUsername, id } = req.user;
+ const { id } = req.user;
const { username, password, passwordconfirm } = req.body;
if (password !== passwordconfirm) {
@@ -105,7 +105,7 @@ app.post("/register", upload.none(), async (req, res) => {
try {
const form = new FormData();
form.append('username', username);
- form.append('email', discordUsername + '@discord.com');
+ form.append('email', id + '@discord.com');
form.append('password', password);
form.append('key', process.env.REG_KEY);
diff --git a/package.json b/package.json
index 8027b21..10776ca 100644
--- a/package.json
+++ b/package.json
@@ -3,8 +3,7 @@
"module": "index.ts",
"type": "module",
"devDependencies": {
- "@types/bun": "latest",
- "tailwindcss": "^3.4.17"
+ "@types/bun": "latest"
},
"peerDependencies": {
"typescript": "^5.0.0"