Skip to content

Commit 8b486bb

Browse files
committed
refactor: enhance auth service for login paths
1 parent 5f82cd9 commit 8b486bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/auth.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export class AuthService {
125125
}
126126

127127
async login(dto: LoginDto) {
128-
const user = await this.users.findByEmail(dto.email);
128+
const user = await this.users.findByEmailWithPassword(dto.email);
129129
if (!user) throw new Error('Invalid credentials.');
130130
if (user.isBanned) throw new Error('Account banned.');
131131
if (!user.isVerified) throw new Error('Email not verified.');

0 commit comments

Comments
 (0)