change login response to be more like discord

This commit is contained in:
murdle 2025-12-20 20:02:04 +02:00
parent a424a8a4d2
commit ec5bafbe0b
4 changed files with 3 additions and 3 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({ user_id: user.id, token, settings: { ...user.settings, index: undefined } });
res.json({ user_id: user.id, token, user_settings: { locale: user.settings?.locale, theme: user.settings?.theme, index: undefined } });
},
);

View File

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