diff --git a/assets/openapi.json b/assets/openapi.json index d2f82e3f..5d22ad78 100644 Binary files a/assets/openapi.json and b/assets/openapi.json differ diff --git a/assets/schemas.json b/assets/schemas.json index d2b7c280..f755669c 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 06e3fe43..d751d7e6 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({ token, settings: { ...user.settings, index: undefined } }); + res.json({ user_id: user.id, token, settings: { ...user.settings, index: undefined } }); }, ); diff --git a/src/schemas/responses/TokenResponse.ts b/src/schemas/responses/TokenResponse.ts index c0f1346c..4deacc01 100644 --- a/src/schemas/responses/TokenResponse.ts +++ b/src/schemas/responses/TokenResponse.ts @@ -21,6 +21,7 @@ import { BackupCode, UserSettings } from "../../util/entities"; export interface TokenResponse { token: string; settings: UserSettings; + user_id?: string; } export interface TokenOnlyResponse {