Change parameter names

This commit is contained in:
An Phan 2016-01-26 14:25:31 +08:00
parent 660700e23f
commit 9a4ee6b8c6
2 changed files with 4 additions and 4 deletions

View file

@ -41,7 +41,7 @@ export default {
this.remove(song);
}
http.post('interaction/like', { id: song.id }, () => {
http.post('interaction/like', { song: song.id }, () => {
if (cb) {
cb();
}
@ -78,7 +78,7 @@ export default {
_.each(songs, song => song.liked = true);
this.state.songs = _.union(this.state.songs, songs);
http.post('interaction/batch/like', { ids: _.pluck(songs, 'id') }, () => {
http.post('interaction/batch/like', { songs: _.pluck(songs, 'id') }, () => {
if (cb) {
cb();
}
@ -97,7 +97,7 @@ export default {
_.each(songs, song => song.liked = false);
this.state.songs = _.difference(this.state.songs, songs);
http.post('interaction/batch/unlike', { ids: _.pluck(songs, 'id') }, () => {
http.post('interaction/batch/unlike', { songs: _.pluck(songs, 'id') }, () => {
if (cb) {
cb();
}

View file

@ -118,7 +118,7 @@ export default {
*/
registerPlay(song) {
// Increase playcount
http.post('interaction/play', { id: song.id }, response => song.playCount = response.data.play_count);
http.post('interaction/play', { song: song.id }, response => song.playCount = response.data.play_count);
},
/**