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 {
async fetchCapture() {
const { ctx, service } = this;
ctx.validate(this.fetchCaptureRule);
const { taskId, type: taskType } = ctx.params;
const { type } = ctx.request.body;
const { taskId, type } = ctx.params;
const { type: taskType } = ctx.request.body;
const result = await service.task.fetchCapture({
taskId,
taskType,
type,
taskType,
});
ctx.success(result);
}
......
......@@ -4,7 +4,7 @@
* @Author: jd
* @Date: 2019-12-02 17:25:35
* @LastEditors: jd
* @LastEditTime: 2019-12-05 11:19:39
* @LastEditTime: 2019-12-05 11:29:10
*/
'use strict';
......@@ -74,14 +74,14 @@ class TaskService extends Service {
return result.data.data.taskId;
}
async fetchCapture({ taskId, taskType, type }) {
async fetchCapture({ taskId, type, taskType }) {
const { taskAPI, ctx } = this;
const { fetchCodeUrl } = taskAPI;
const result = await this._request(this.checkType(type) + fetchCodeUrl, {
method: 'post',
data: {
taskId,
taskType,
type: taskType,
},
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