Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2019-07-03 15:11:47 +0300
committerWinnie Hellmann <winnie@gitlab.com>2019-07-03 15:11:47 +0300
commitd09a51c34b122d2b08f8b247dfdffb57ceef4310 (patch)
tree4645ad2ed7cc9e98894739368b9b4d112d156717
parent2ca9bda400c0ed647c3ef342dcc0aa56c558cebe (diff)
Remove fetchDiscussions from notes service
-rw-r--r--app/assets/javascripts/notes/services/notes_service.js4
-rw-r--r--app/assets/javascripts/notes/stores/actions.js7
2 files changed, 3 insertions, 8 deletions
diff --git a/app/assets/javascripts/notes/services/notes_service.js b/app/assets/javascripts/notes/services/notes_service.js
index 237e70c0a4c..0fcf63e691b 100644
--- a/app/assets/javascripts/notes/services/notes_service.js
+++ b/app/assets/javascripts/notes/services/notes_service.js
@@ -6,10 +6,6 @@ import * as constants from '../constants';
Vue.use(VueResource);
export default {
- fetchDiscussions(endpoint, filter) {
- const config = filter !== undefined ? { params: { notes_filter: filter } } : null;
- return Vue.http.get(endpoint, config);
- },
deleteNote(endpoint) {
return Vue.http.delete(endpoint);
},
diff --git a/app/assets/javascripts/notes/stores/actions.js b/app/assets/javascripts/notes/stores/actions.js
index 9054b4779aa..9ca85683987 100644
--- a/app/assets/javascripts/notes/stores/actions.js
+++ b/app/assets/javascripts/notes/stores/actions.js
@@ -46,10 +46,9 @@ export const setNotesFetchedState = ({ commit }, state) =>
export const toggleDiscussion = ({ commit }, data) => commit(types.TOGGLE_DISCUSSION, data);
export const fetchDiscussions = ({ commit, dispatch }, { path, filter }) =>
- service
- .fetchDiscussions(path, filter)
- .then(res => res.json())
- .then(discussions => {
+ axios
+ .get(path, filter !== undefined ? { params: { notes_filter: filter } } : null)
+ .then(({ data: discussions }) => {
commit(types.SET_INITIAL_DISCUSSIONS, discussions);
dispatch('updateResolvableDiscussionsCounts');
});