瀏覽代碼

班主任添加不返回信息bug(也算不上吧)

lrf 1 年之前
父節點
當前提交
d40b5e091e
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      app/service/headteacher.js

+ 1 - 0
app/service/headteacher.js

@@ -24,6 +24,7 @@ class HeadteacherService extends CrudService {
     const newdata = { name, mobile, type: '1', uid: res.id };
     const newdata = { name, mobile, type: '1', uid: res.id };
     newdata.passwd = { secret: '12345678' };
     newdata.passwd = { secret: '12345678' };
     await this.umodel.create(newdata);
     await this.umodel.create(newdata);
+    return await this.model.findById(res.id || res._id);
   }
   }
 
 
   async update({ id }, data) {
   async update({ id }, data) {