add user id in loginresponse

This commit is contained in:
murdle 2025-12-20 19:37:06 +02:00
parent d01b924854
commit a424a8a4d2
4 changed files with 2 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@ -201,7 +201,7 @@ router.post(
// Discord header is just the user id as string, which is not possible with npm-jsonwebtoken package
// https://user-images.githubusercontent.com/6506416/81051916-dd8c9900-8ec2-11ea-8794-daf12d6f31f0.png
res.json({ token, settings: { ...user.settings, index: undefined } });
res.json({ user_id: user.id, token, settings: { ...user.settings, index: undefined } });
},
);

View File

@ -21,6 +21,7 @@ import { BackupCode, UserSettings } from "../../util/entities";
export interface TokenResponse {
token: string;
settings: UserSettings;
user_id?: string;
}
export interface TokenOnlyResponse {