mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-26 01:44:53 +10:00
fix issues suggested by coderabbit
This commit is contained in:
@@ -33,11 +33,11 @@ export class GitHubStrategy extends PassportStrategy(Strategy, "github") {
|
||||
if (!email) throw new BadRequestException(ErrorMessage.InvalidCredentials);
|
||||
|
||||
try {
|
||||
const user =
|
||||
user =
|
||||
(await this.userService.findOneByIdentifier(email)) ??
|
||||
(username && (await this.userService.findOneByIdentifier(username)));
|
||||
(username ? await this.userService.findOneByIdentifier(username) : null);
|
||||
|
||||
if (!user) throw new Error(ErrorMessage.InvalidCredentials);
|
||||
if (!user) throw new BadRequestException(ErrorMessage.InvalidCredentials);
|
||||
|
||||
done(null, user);
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user