Commit 072ad1db authored by 姜登's avatar 姜登

type

parent cf8b2060
Pipeline #17851 passed with stage
in 3 seconds
...@@ -102,12 +102,12 @@ class TaskController extends Controller { ...@@ -102,12 +102,12 @@ class TaskController extends Controller {
async fetchCapture() { async fetchCapture() {
const { ctx, service } = this; const { ctx, service } = this;
ctx.validate(this.fetchCaptureRule); ctx.validate(this.fetchCaptureRule);
const { taskId, type: taskType } = ctx.params; const { taskId, type } = ctx.params;
const { type } = ctx.request.body; const { type: taskType } = ctx.request.body;
const result = await service.task.fetchCapture({ const result = await service.task.fetchCapture({
taskId, taskId,
taskType,
type, type,
taskType,
}); });
ctx.success(result); ctx.success(result);
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: jd * @Author: jd
* @Date: 2019-12-02 17:25:35 * @Date: 2019-12-02 17:25:35
* @LastEditors: jd * @LastEditors: jd
* @LastEditTime: 2019-12-05 11:19:39 * @LastEditTime: 2019-12-05 11:29:10
*/ */
'use strict'; 'use strict';
...@@ -74,14 +74,14 @@ class TaskService extends Service { ...@@ -74,14 +74,14 @@ class TaskService extends Service {
return result.data.data.taskId; return result.data.data.taskId;
} }
async fetchCapture({ taskId, taskType, type }) { async fetchCapture({ taskId, type, taskType }) {
const { taskAPI, ctx } = this; const { taskAPI, ctx } = this;
const { fetchCodeUrl } = taskAPI; const { fetchCodeUrl } = taskAPI;
const result = await this._request(this.checkType(type) + fetchCodeUrl, { const result = await this._request(this.checkType(type) + fetchCodeUrl, {
method: 'post', method: 'post',
data: { data: {
taskId, taskId,
taskType, type: taskType,
}, },
contentType: 'json', contentType: 'json',
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment