add user id in loginresponse
This commit is contained in:
parent
d01b924854
commit
a424a8a4d2
Binary file not shown.
Binary file not shown.
@ -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 } });
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@ -21,6 +21,7 @@ import { BackupCode, UserSettings } from "../../util/entities";
|
||||
export interface TokenResponse {
|
||||
token: string;
|
||||
settings: UserSettings;
|
||||
user_id?: string;
|
||||
}
|
||||
|
||||
export interface TokenOnlyResponse {
|
||||
|
||||
Reference in New Issue
Block a user