Browse Source

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

lrf 1 year ago
parent
commit
d40b5e091e
1 changed files with 1 additions and 0 deletions
  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 };
     newdata.passwd = { secret: '12345678' };
     await this.umodel.create(newdata);
+    return await this.model.findById(res.id || res._id);
   }
 
   async update({ id }, data) {