diff --git a/app/assets/javascripts/angularjs/services/project.js b/app/assets/javascripts/angularjs/services/project.js index 851a95a98..a1fb48023 100644 --- a/app/assets/javascripts/angularjs/services/project.js +++ b/app/assets/javascripts/angularjs/services/project.js @@ -1,31 +1,31 @@ RosaABF.factory("ApiProject", ['$resource', function($resource) { var ProjectResource = $resource( - '/:owner/:project', + '/:owner/:project?format=json', {owner: '@project.owner.uname', project: '@project.name'}, { tags: { - url: '/:owner/:project/tags', + url: '/:owner/:project/tags.json', method: 'GET', isArray : false }, branches: { - url: '/:owner/:project/branches', + url: '/:owner/:project/branches.json', method: 'GET', isArray : false }, delete_branch: { - url: '/:owner/:project/branches/:ref', + url: '/:owner/:project/branches/:ref.json', method: 'DELETE', isArray : false }, restore_branch: { - url: '/:owner/:project/branches/:ref', // ?sha= + url: '/:owner/:project/branches/:ref.json', // ?sha= method: 'PUT', isArray : false }, create_branch: { - url: '/:owner/:project/branches', // ?new_ref=&from_ref= + url: '/:owner/:project/branches.json', // ?new_ref=&from_ref= method: 'POST', isArray : false } diff --git a/app/assets/javascripts/angularjs/services/pull_request.js b/app/assets/javascripts/angularjs/services/pull_request.js index 95aeb96ea..d7fff32e5 100644 --- a/app/assets/javascripts/angularjs/services/pull_request.js +++ b/app/assets/javascripts/angularjs/services/pull_request.js @@ -1,7 +1,7 @@ RosaABF.factory("ApiPullRequest", ['$resource', function($resource) { var PullRequestResource = $resource( - '/:owner/:project/pull_requests/:serial_id', + '/:owner/:project/pull_requests/:serial_id.json', { owner: '@pull_request.to_ref.project.owner_uname', project: '@pull_request.to_ref.project.name', @@ -13,7 +13,7 @@ RosaABF.factory("ApiPullRequest", ['$resource', function($resource) { isArray : false }, merge: { - url: '/:owner/:project/pull_requests/:serial_id/merge', + url: '/:owner/:project/pull_requests/:serial_id/merge.json', method: 'PUT', isArray: false }