Skip to content

Commit

Permalink
fix(Activities): songId should now be youtubeId when dealing with songs
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan <theflametrooper@gmail.com>
  • Loading branch information
jonathan-grah committed Apr 22, 2021
1 parent f517259 commit bd15985
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion backend/logic/actions/reports.js
Expand Up @@ -315,7 +315,7 @@ export default {
type: "song__report",
payload: {
message: `Reported song <youtubeId>${song.title} by ${song.artists.join(", ")}</youtubeId>`,
songId: data.song._id,
youtubeId: data.song.youtubeId,
thumbnail: song.thumbnail
}
});
Expand Down
9 changes: 5 additions & 4 deletions backend/logic/actions/songs.js
Expand Up @@ -1098,7 +1098,7 @@ export default {
type: "song__like",
payload: {
message: `Liked song <youtubeId>${song.title} by ${song.artists.join(", ")}</youtubeId>`,
songId: song._id,
youtubeId,
thumbnail: song.thumbnail
}
});
Expand Down Expand Up @@ -1213,7 +1213,7 @@ export default {
type: "song__dislike",
payload: {
message: `Disliked song <youtubeId>${song.title} by ${song.artists.join(", ")}</youtubeId>`,
songId: song._id,
youtubeId,
thumbnail: song.thumbnail
}
});
Expand Down Expand Up @@ -1328,7 +1328,7 @@ export default {
message: `Removed <youtubeId>${song.title} by ${song.artists.join(
", "
)}</youtubeId> from your Disliked Songs`,
songId: song._id,
youtubeId,
thumbnail: song.thumbnail
}
});
Expand Down Expand Up @@ -1443,7 +1443,7 @@ export default {
message: `Removed <youtubeId>${song.title} by ${song.artists.join(
", "
)}</youtubeId> from your Liked Songs`,
songId: song._id,
youtubeId,
thumbnail: song.thumbnail
}
});
Expand Down Expand Up @@ -1471,6 +1471,7 @@ export default {
async.waterfall(
[
next => {
console.log(youtubeId);
songModel.findOne({ youtubeId }, next);
},

Expand Down
2 changes: 0 additions & 2 deletions frontend/src/pages/Station/index.vue
Expand Up @@ -799,8 +799,6 @@ export default {
res.status === "success" &&
this.currentSong.youtubeId === res.data.youtubeId
) {
console.log(res);
this.liked = res.data.liked;
this.disliked = res.data.disliked;
Expand Down

0 comments on commit bd15985

Please sign in to comment.