Skip to content

Commit

Permalink
Update to match api
Browse files Browse the repository at this point in the history
  • Loading branch information
robbevp committed Mar 9, 2024
1 parent 7a7b4cb commit 7ea71ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/AddToPlaylist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ export default {
this.selectedPlaylist.playlist_type.charAt(0).toUpperCase() +
this.selectedPlaylist.playlist_type.slice(1);
this.addItem({
id: this.selectedPlaylist.id,
newItem: {
playlist_id: this.selectedPlaylist.id,
item_id: this.item.id,
item_type,
},
Expand Down
4 changes: 2 additions & 2 deletions src/store/playlists.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ export default {
return false;
}
},
async addItem({ commit, rootState, dispatch }, { newItem }) {
async addItem({ commit, rootState, dispatch }, { id, newItem }) {
try {
await api.playlist_items.create(rootState.auth, {
await api.playlists.addItem(rootState.auth, id, {
playlist_item: newItem,
});
await dispatch("read", newItem.playlist_id);
Expand Down

0 comments on commit 7ea71ee

Please sign in to comment.