Changed discord usernames to id as they are permanent unlike username which can be changed

This commit is contained in:
Andrew Lee 2024-12-24 17:34:23 -05:00
parent 12669097d8
commit 39cbc8c286
Signed by: andrew
SSH key fingerprint: SHA256:bbGg1DYG5CuKl2jo1DqzvUsaTeyvhM3tjCsej5lYMg4
3 changed files with 3 additions and 4 deletions

BIN
bun.lockb

Binary file not shown.

View file

@ -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);

View file

@ -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"