lrf пре 3 година
родитељ
комит
4e14f28a2a
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      app/service/mission.js

+ 2 - 2
app/service/mission.js

@@ -68,10 +68,10 @@ class MissionService extends CrudService {
       );
     } catch (error) {
       console.error(error.toString());
-      await this.updateOne({ id }, { status: '3' });
+      await this.model.updateOne({ id }, { status: '3' });
       throw new BusinessError(ErrorCode.SERVICE_FAULT, '执行任务失败');
     }
-    await this.updateOne({ id }, { status: '1', progress: undefined });
+    await this.model.updateOne({ id }, { status: '1', progress: undefined });
   }
 
   async updateProgress({ id, progress, status = '1', remark }) {