Skip to content

Commit

Permalink
Merge pull request #62 from motionharvest/master
Browse files Browse the repository at this point in the history
Updated addBoard to include trailing "/"
  • Loading branch information
norberteder authored Oct 10, 2018
2 parents 4e90205 + 83c4fe0 commit 7b7b5fa
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
.vscode/launch.json
package-lock.json
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Trello.prototype.addBoard = function (name, description, organizationId, callbac
if (organizationId !== null)
query.idOrganization = organizationId;

return makeRequest(rest.post, this.uri + '/1/boards', {query: query}, callback);
return makeRequest(rest.post, this.uri + '/1/boards/', {query: query}, callback);
};

Trello.prototype.updateBoardPref = function (boardId, field, value, callback) {
Expand Down
20 changes: 12 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,18 @@
"name": "Siôn Le Roux",
"email": "[email protected]"
},
{
"name": "Mike Garuccio",
"url": "https://github.com/mgaruccio"
},
{
"name": "Karel Piwko",
"url": "https://github.com/kpiwko"
}
{
"name": "Mike Garuccio",
"url": "https://github.com/mgaruccio"
},
{
"name": "Karel Piwko",
"url": "https://github.com/kpiwko"
},
{
"name": "Aaron Sherrill",
"url": "https://github.com/motionharvest"
}
],
"scripts": {
"test": "node node_modules/mocha/bin/mocha"
Expand Down
4 changes: 2 additions & 2 deletions test/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ describe('Trello', function () {
});
});

it('should post to https://api.trello.com/1/boards', function () {
post.should.have.been.calledWith('https://api.trello.com/1/boards');
it('should post to https://api.trello.com/1/boards/', function () {
post.should.have.been.calledWith('https://api.trello.com/1/boards/');
});

it('should include the description', function () {
Expand Down

0 comments on commit 7b7b5fa

Please sign in to comment.