diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2019-07-10 07:43:45 +0000 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-07-10 07:43:45 +0000 |
commit | 560d8bcc5903ef0244f75de86eb31cdf7a9abad6 (patch) | |
tree | d63c7fcd034202a0caa0892e8ace9e34147f692b /app/assets/javascripts | |
parent | f39b783385293e78cd39d9ec044e730f03c68a0d (diff) | |
download | gitlab-ce-560d8bcc5903ef0244f75de86eb31cdf7a9abad6.tar.gz |
Remove toggleAward from notes service
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/notes/services/notes_service.js | 3 | ||||
-rw-r--r-- | app/assets/javascripts/notes/stores/actions.js | 9 |
2 files changed, 3 insertions, 9 deletions
diff --git a/app/assets/javascripts/notes/services/notes_service.js b/app/assets/javascripts/notes/services/notes_service.js index 47a6f07cce2..bc0f5c19b9d 100644 --- a/app/assets/javascripts/notes/services/notes_service.js +++ b/app/assets/javascripts/notes/services/notes_service.js @@ -38,9 +38,6 @@ export default { return Vue.http.get(endpoint, options); }, - toggleAward(endpoint, data) { - return Vue.http.post(endpoint, data, { emulateJSON: true }); - }, toggleIssueState(endpoint, data) { return Vue.http.put(endpoint, data); }, diff --git a/app/assets/javascripts/notes/stores/actions.js b/app/assets/javascripts/notes/stores/actions.js index fef962f008e..2eefef8bd6e 100644 --- a/app/assets/javascripts/notes/stores/actions.js +++ b/app/assets/javascripts/notes/stores/actions.js @@ -384,12 +384,9 @@ export const toggleAward = ({ commit, getters }, { awardName, noteId }) => { export const toggleAwardRequest = ({ dispatch }, data) => { const { endpoint, awardName } = data; - return service - .toggleAward(endpoint, { name: awardName }) - .then(res => res.json()) - .then(() => { - dispatch('toggleAward', data); - }); + return axios.post(endpoint, { name: awardName }).then(() => { + dispatch('toggleAward', data); + }); }; export const scrollToNoteIfNeeded = (context, el) => { |