Skip to content

Commit

Permalink
return movie title in reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
俞晓莉 committed Dec 8, 2023
1 parent b435955 commit 4091b1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/my_like.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exports.my_like = async (req, res) => {
var rds_response = new Promise((resolve, reject) => {
try {
console.log("/stats: calling RDS...");
var sql = "Select Likes.*, Review.*, User.Username from Likes join Review join User on Likes.ReviewID = Review.ReviewID and Review.UserID = User.UserID where Likes.UserID = ?;";
var sql = "Select Likes.*, Review.*, User.Username, Movie.Title from Likes join Review join User join Movie on Likes.ReviewID = Review.ReviewID and Review.UserID = User.UserID and Review.MovieID = Movie.MovieID where Likes.UserID = ?;";
dbConnection.query(sql, params, (err, results, _) => {
try {
if (err) {
Expand Down

0 comments on commit 4091b1b

Please sign in to comment.