lrf402788946 4 tahun lalu
induk
melakukan
d6184c4edf
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      app/service/user.js

+ 1 - 1
app/service/user.js

@@ -86,7 +86,7 @@ class UserService extends CrudService {
       user.unionid = unionid;
       await user.save();
     } else {
-      const stud = await this.stuModel.findOne({ id_number });
+      const stud = await this.stuModel.findOne({ id_number: { $regex: `^${id_number}$`, $options: 'i' } });
       if (!stud) {
         throw new BusinessError(ErrorCode.USER_NOT_EXIST);
       }