Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1de23708
Commit
1de23708
authored
Aug 16, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated JSON endpoints
parent
7e7673d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
app/assets/javascripts/boards/services/board_service.js.es6
app/assets/javascripts/boards/services/board_service.js.es6
+8
-11
No files found.
app/assets/javascripts/boards/services/board_service.js.es6
View file @
1de23708
...
@@ -2,8 +2,7 @@ class BoardService {
...
@@ -2,8 +2,7 @@ class BoardService {
constructor (root) {
constructor (root) {
Vue.http.options.root = root;
Vue.http.options.root = root;
this.lists = Vue.resource(`${root}{/id}.json`, {});
this.lists = Vue.resource(`${root}/lists{/id}.json`, {}, {
this.list = Vue.resource(`${root}/lists{/id}.json`, {}, {
generate: {
generate: {
method: 'POST',
method: 'POST',
url: `${root}/lists/generate.json`
url: `${root}/lists/generate.json`
...
@@ -25,13 +24,13 @@ class BoardService {
...
@@ -25,13 +24,13 @@ class BoardService {
generateDefaultLists () {
generateDefaultLists () {
this.setCSRF();
this.setCSRF();
return this.list.generate({});
return this.list
s
.generate({});
}
}
createList (labelId) {
createList (labelId) {
this.setCSRF();
this.setCSRF();
return this.list.save({}, {
return this.list
s
.save({}, {
list: {
list: {
label_id: labelId
label_id: labelId
}
}
...
@@ -41,7 +40,7 @@ class BoardService {
...
@@ -41,7 +40,7 @@ class BoardService {
updateList (list) {
updateList (list) {
this.setCSRF();
this.setCSRF();
return this.list.update({ id: list.id }, {
return this.list
s
.update({ id: list.id }, {
list: {
list: {
position: list.position
position: list.position
}
}
...
@@ -51,7 +50,7 @@ class BoardService {
...
@@ -51,7 +50,7 @@ class BoardService {
destroyList (id) {
destroyList (id) {
this.setCSRF();
this.setCSRF();
return this.list.delete({ id });
return this.list
s
.delete({ id });
}
}
getIssuesForList (id, filter = {}) {
getIssuesForList (id, filter = {}) {
...
@@ -62,12 +61,10 @@ class BoardService {
...
@@ -62,12 +61,10 @@ class BoardService {
return this.issues.get(data);
return this.issues.get(data);
}
}
moveIssue (id, from
, to
) {
moveIssue (id, from
_list_id, to_list_id
) {
return this.issue.update({ id }, {
return this.issue.update({ id }, {
issue: {
from_list_id,
from,
to_list_id
to
}
});
});
}
}
};
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment