Skip to content

Commit 32e3839

Browse files
committed
change task to taskdata
1 parent 81986c7 commit 32e3839

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

controllers/tasks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ const getTask = async (req, res) => {
159159
}
160160
return res.json({
161161
message: "task returned successfully",
162-
task: { ...taskData, dependsOn: dependencyDocReference },
162+
taskData: { ...taskData, dependsOn: dependencyDocReference },
163163
});
164164
} catch (err) {
165165
return res.boom.badImplementation(INTERNAL_SERVER_ERROR);

test/integration/extensionRequests.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ describe("Extension Requests", function () {
536536
expect(res).to.have.status(200);
537537
expect(res.body).to.be.a("object");
538538
expect(res.body.message).to.equal("task returned successfully");
539-
expect(res.body.task.endsOn).to.equal(1235);
539+
expect(res.body.taskData.endsOn).to.equal(1235);
540540

541541
return done();
542542
});

test/integration/tasks.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ describe("Tasks", function () {
185185
expect(res).to.have.status(200);
186186
expect(res.body).to.be.a("object");
187187
expect(res.body.message).to.be.equal("task returned successfully");
188-
expect(res.body.task).to.be.a("object");
189-
expect(res.body.task.dependsOn).to.be.a("array");
188+
expect(res.body.taskData).to.be.a("object");
189+
expect(res.body.taskData.dependsOn).to.be.a("array");
190190

191191
return done();
192192
});
@@ -200,7 +200,7 @@ describe("Tasks", function () {
200200
return done(err);
201201
}
202202

203-
expect(res.body.task).to.have.property("isCollapsed");
203+
expect(res.body.taskData).to.have.property("isCollapsed");
204204
return done();
205205
});
206206
});

0 commit comments

Comments
 (0)