Skip to content

Commit

Permalink
Merge pull request #28 from PyBossa/api-context
Browse files Browse the repository at this point in the history
Api context
  • Loading branch information
teleyinex committed Apr 4, 2016
2 parents 6ac34aa + fca545f commit 787088c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pybossa.js",
"version": "0.3.0",
"version": "1.1.0",
"description": "JavaScript library to interact with a PyBossa server.",
"main": "pybossa.js",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion pybossa.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
function _fetchProject(projectname) {
return $.ajax({
url: url + 'api/project',
data: 'short_name='+projectname,
data: 'all=1&short_name='+projectname,
dataType:'json'
});
}
Expand Down
8 changes: 4 additions & 4 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test('should get a new task for the "slug" project from the server', function()

// The endpoint for the FakeServer:
server.respondWith(
"GET", "/api/project?short_name=slug",
"GET", "/api/project?all=1&short_name=slug",
[200, { "Content-type": "application/json" },
JSON.stringify(project)]
);
Expand Down Expand Up @@ -117,7 +117,7 @@ test('should get a new task for the "slug" project from the server', function()

// The endpoint for the FakeServer:
server.respondWith(
"GET", "/api/project?short_name=slug",
"GET", "/api/project?all=1&short_name=slug",
[200, { "Content-type": "application/json" },
JSON.stringify(project)]
);
Expand Down Expand Up @@ -173,7 +173,7 @@ test('should get the task specified in the url (server/project/projectName/task/

// The endpoint for the FakeServer:
server.respondWith(
"GET", "/api/project?short_name=slug",
"GET", "/api/project?all=1&short_name=slug",
[200, { "Content-type": "application/json" },
JSON.stringify(project)]
);
Expand Down Expand Up @@ -245,7 +245,7 @@ test('loads a different "next" task when requesting what would be returned as "n

// The endpoint for the FakeServer:
server.respondWith(
"GET", "/api/project?short_name=slug",
"GET", "/api/project?all=1&short_name=slug",
[200, { "Content-type": "application/json" },
JSON.stringify(project)]
);
Expand Down

0 comments on commit 787088c

Please sign in to comment.