Skip to content

Commit 5408018

Browse files
committed
Merge pull request #41 from VisualTesting/fix/query-params
Using query params instead of body for getBuild
2 parents b0d3341 + 9bb5743 commit 5408018

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

server/controllers/api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ Api.prototype = {
172172
},
173173

174174
getBuild: function(req, res) {
175-
var project = req.body.project;
176-
var buildId = req.body.id;
175+
var project = req.query.project;
176+
var buildId = req.query.id;
177177

178178
if (!project || !buildId) {
179179
res.status(400).json({

test/api-test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ describe('module/api', function() {
381381
build: id
382382
})).resolves(false);
383383

384-
instance = instance.send({
384+
instance = instance.query({
385385
project: project,
386386
id: id
387387
})
@@ -397,7 +397,7 @@ describe('module/api', function() {
397397

398398
storageStub.hasBuild = this.sinon.stub().resolves(false);
399399

400-
instance = instance.send({
400+
instance = instance.query({
401401
project: project,
402402
id: id
403403
});
@@ -429,7 +429,7 @@ describe('module/api', function() {
429429
storageStub.hasBuild = this.sinon.stub().resolves(true);
430430

431431
instance = api.get('/api/getBuild')
432-
.send({
432+
.query({
433433
project: project,
434434
id: buildId
435435
});
@@ -442,7 +442,7 @@ describe('module/api', function() {
442442
build: buildId
443443
})).resolves();
444444

445-
return instance.send({
445+
return instance.query({
446446
project: project,
447447
id: buildId
448448
})

0 commit comments

Comments
 (0)