Commit 45318790 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'winh-notes-service-toggleAward' into 'master'

Remove toggleAward from notes service

See merge request gitlab-org/gitlab-ce!30536
parents f39b7833 560d8bcc
...@@ -38,9 +38,6 @@ export default { ...@@ -38,9 +38,6 @@ export default {
return Vue.http.get(endpoint, options); return Vue.http.get(endpoint, options);
}, },
toggleAward(endpoint, data) {
return Vue.http.post(endpoint, data, { emulateJSON: true });
},
toggleIssueState(endpoint, data) { toggleIssueState(endpoint, data) {
return Vue.http.put(endpoint, data); return Vue.http.put(endpoint, data);
}, },
......
...@@ -384,10 +384,7 @@ export const toggleAward = ({ commit, getters }, { awardName, noteId }) => { ...@@ -384,10 +384,7 @@ export const toggleAward = ({ commit, getters }, { awardName, noteId }) => {
export const toggleAwardRequest = ({ dispatch }, data) => { export const toggleAwardRequest = ({ dispatch }, data) => {
const { endpoint, awardName } = data; const { endpoint, awardName } = data;
return service return axios.post(endpoint, { name: awardName }).then(() => {
.toggleAward(endpoint, { name: awardName })
.then(res => res.json())
.then(() => {
dispatch('toggleAward', data); dispatch('toggleAward', data);
}); });
}; };
......
---
title: Remove toggleAward from notes service
merge_request: 30536
author: Frank van Rest
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment