fix: await async generateToken in auth service
- Add await to all generateToken() calls - Fixes empty token issue in login/register responses - Token now properly includes user role for admin access
This commit is contained in:
6
apps/api/dist/auth/auth.controller.d.ts
vendored
6
apps/api/dist/auth/auth.controller.d.ts
vendored
@@ -21,7 +21,7 @@ export declare class AuthController {
|
||||
avatarUrl: string | null;
|
||||
emailVerified: boolean;
|
||||
};
|
||||
token: Promise<string>;
|
||||
token: string;
|
||||
}>;
|
||||
login(body: {
|
||||
email: string;
|
||||
@@ -44,7 +44,7 @@ export declare class AuthController {
|
||||
avatarUrl: string | null;
|
||||
emailVerified: boolean;
|
||||
};
|
||||
token: Promise<string>;
|
||||
token: string;
|
||||
requiresOtp?: undefined;
|
||||
availableMethods?: undefined;
|
||||
tempToken?: undefined;
|
||||
@@ -61,7 +61,7 @@ export declare class AuthController {
|
||||
avatarUrl: string | null;
|
||||
emailVerified: boolean;
|
||||
};
|
||||
token: Promise<string>;
|
||||
token: string;
|
||||
}>;
|
||||
googleAuth(): Promise<void>;
|
||||
googleAuthCallback(req: any, res: Response): Promise<void>;
|
||||
|
||||
Reference in New Issue
Block a user