mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-24 09:45:11 +02:00
refactor: User and session management
This commit is contained in:
@@ -19,6 +19,7 @@ export class AuthService {
|
||||
password: string,
|
||||
): Promise<{
|
||||
token: string;
|
||||
user: User;
|
||||
}> {
|
||||
let user = await this.userService.findOneByName(name);
|
||||
if (!user && (await this.userService.noPreviousAdmins()))
|
||||
@@ -34,6 +35,7 @@ export class AuthService {
|
||||
|
||||
return {
|
||||
token: await this.jwtService.signAsync(payload),
|
||||
user,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user