diff --git a/assets/openapi.json b/assets/openapi.json index 5d22ad78..4ec7febc 100644 Binary files a/assets/openapi.json and b/assets/openapi.json differ diff --git a/assets/schemas.json b/assets/schemas.json index f755669c..27a7594a 100644 Binary files a/assets/schemas.json and b/assets/schemas.json differ diff --git a/src/api/routes/auth/login.ts b/src/api/routes/auth/login.ts index d751d7e6..91590544 100644 --- a/src/api/routes/auth/login.ts +++ b/src/api/routes/auth/login.ts @@ -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 } }); }, ); diff --git a/src/schemas/responses/TokenResponse.ts b/src/schemas/responses/TokenResponse.ts index 4deacc01..80b2782d 100644 --- a/src/schemas/responses/TokenResponse.ts +++ b/src/schemas/responses/TokenResponse.ts @@ -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 {