|
@@ -23,8 +23,12 @@ class TeacherService extends CrudService {
|
|
|
.limit(Number(limit));
|
|
|
res = JSON.parse(JSON.stringify(res));
|
|
|
for (const tea of res) {
|
|
|
- const r = await this.umodel.findOne({ uid: tea._id });
|
|
|
- if (r) tea.openid = _.get(r, 'openid');
|
|
|
+ const r = await this.umodel.findOne({ uid: tea._id }, '+passwd');
|
|
|
+ if (r) {
|
|
|
+ const { passwd } = r;
|
|
|
+ tea.secret = passwd.secret;
|
|
|
+ tea.openid = _.get(r, 'openid');
|
|
|
+ }
|
|
|
}
|
|
|
return res;
|
|
|
}
|