zs hai 2 meses
pai
achega
72f3d14bdd
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/service/frame/Login.service.ts

+ 1 - 1
src/service/frame/Login.service.ts

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