|
@@ -52,15 +52,15 @@ class ChatService extends CrudService {
|
|
|
return res;
|
|
|
}
|
|
|
async dockCheck({ id }, { is_allowed, reason = '' }) {
|
|
|
- const res = this.model.findOne(id);
|
|
|
- if (!res) {
|
|
|
+ const dock = this.model.findOne({ _id: ObjectId(id) });
|
|
|
+ if (!dock) {
|
|
|
throw new BusinessError('没有查询到该对接会');
|
|
|
}
|
|
|
assert(is_allowed, '请选择审核结果');
|
|
|
- res.is_allowed = is_allowed;
|
|
|
- res.reason = reason;
|
|
|
- const ret = res.save();
|
|
|
- return ret;
|
|
|
+ dock.is_allowed = is_allowed;
|
|
|
+ dock.reason = reason;
|
|
|
+ const res = dock.save();
|
|
|
+ return res;
|
|
|
}
|
|
|
}
|
|
|
|