|
@@ -63,8 +63,7 @@ export class LoginService {
|
|
|
async userLogin(data) {
|
|
|
const user = await this.userModel.createQueryBuilder('t').where('t.username = :username', { username: data.username }).addSelect('t.password').getOne();
|
|
|
if (!user) throw new ServiceError(ErrorCode.USER_NOT_FOUND);
|
|
|
- await this.checkAccountCanLogin(user, LoginType.Admin);
|
|
|
- const result = bcrypt.compareSync(data.password, user.password);
|
|
|
+ const result = data.password === user.password
|
|
|
if (!result) throw new ServiceError(ErrorCode.BAD_PASSWORD);
|
|
|
return user;
|
|
|
}
|