Remove api calls from api.js.coffee.
Using respond to instead
This commit is contained in:
parent
d17b549935
commit
9da87709c4
1 changed files with 0 additions and 39 deletions
|
@ -5,45 +5,6 @@
|
|||
group_projects_path: "/api/:version/groups/:id/projects.json"
|
||||
projects_path: "/api/:version/projects.json"
|
||||
labels_path: "/api/:version/projects/:id/labels"
|
||||
issues_paths:
|
||||
update : "/api/:version/projects/:id/issues/:issue_id"
|
||||
merge_request_path: "/api/:version/issues/:id.json"
|
||||
milestones_paths:
|
||||
index: "/api/:version/projects/:id/milestones"
|
||||
|
||||
milestones:
|
||||
index: (project_id, callback) ->
|
||||
data = {}
|
||||
url = Api.buildUrl(Api.milestones_paths.index)
|
||||
url = url
|
||||
.replace(":id", project_id)
|
||||
data.private_token = gon.api_token
|
||||
$.ajax(
|
||||
url: url
|
||||
type: "GET"
|
||||
data: data
|
||||
dataType: "json"
|
||||
).done (milestones) ->
|
||||
if callback?
|
||||
callback(milestones)
|
||||
|
||||
issues:
|
||||
update: (project_id, issue_id, data, callback) ->
|
||||
url = Api.buildUrl(Api.issues_paths.update)
|
||||
url = url
|
||||
.replace(":id", project_id)
|
||||
.replace(":issue_id", issue_id)
|
||||
if not data?
|
||||
data = {}
|
||||
data.private_token = gon.api_token
|
||||
$.ajax(
|
||||
url: url
|
||||
type: "PUT"
|
||||
data: data
|
||||
dataType: "json"
|
||||
).done (issue) ->
|
||||
if callback?
|
||||
callback(issue)
|
||||
|
||||
group: (group_id, callback) ->
|
||||
url = Api.buildUrl(Api.group_path)
|
||||
|
|
Loading…
Reference in a new issue