liuyu пре 4 година
родитељ
комит
e824516b9f
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      app/service/roomuser.js

+ 1 - 0
app/service/roomuser.js

@@ -84,6 +84,7 @@ class RoomuserService extends CrudService {
     const { name, phone, openid } = data;
     assert(name, '用户名不能为空');
     assert(phone, '电话号码不能为空');
+    assert(openid, '微信openid不能为空');
     const has_phone = await this.model.findOne({ phone });
     if (has_phone) {
       throw new BusinessError('此手机号已被注册,请更换手机号');