diff --git a/changelog.txt b/changelog.txt index 234c7bf..694d04e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1 +1 @@ -Adapt to new endpoint for ttt, bux fixes in TypeWord \ No newline at end of file +new usernameing method \ No newline at end of file diff --git a/src/routes/users.ts b/src/routes/users.ts index 9c75aee..a02556f 100644 --- a/src/routes/users.ts +++ b/src/routes/users.ts @@ -45,7 +45,7 @@ router.get("/callback/discord", async (req: Request, res: Response) => { }) const getUnameJson = await getUname.json(); if(getUname.ok){ - const username = getUnameJson.username; + const username = getUnameJson.username + ".discord"; const now = new Date(); await discojs.sendMessage(logChannel, undefined, [{title: "New login", description: `Time: ${now.toString()}\nUsername: ${username}\nMethod: Discord`}]); req.session.username = username; @@ -92,7 +92,7 @@ router.get("/callback/github", async (req: Request, res: Response) => { const getUsernameJson = await getUsername.json(); if (exchangeCode.ok){ - const username = getUsernameJson.login; + const username = getUsernameJson.login + ".github"; const now = new Date(); await discojs.sendMessage(logChannel, undefined, [{title: "New login", description: `Time: ${now.toString()}\nUsername: ${username}\nMethod: GitHub`}]); req.session.username = username;