Skip to content

Commit

Permalink
review add username
Browse files Browse the repository at this point in the history
  • Loading branch information
俞晓莉 authored and 俞晓莉 committed Dec 7, 2023
1 parent a2162c2 commit 1fbe7a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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 * from Likes join Review on Likes.ReviewID = Review.ReviewID where Likes.UserID = ?;";
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 = ?;";
dbConnection.query(sql, params, (err, results, _) => {
try {
if (err) {
Expand Down
2 changes: 1 addition & 1 deletion backend/my_review.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exports.my_review = async (req, res) => {
var rds_response_1 = new Promise((resolve, reject) => {
try {
console.log("/stats: calling RDS...");
var sql = "Select * from Review join Movie on Movie.MovieID = Review.MovieID where Review.UserID = ?;";
var sql = "Select Review.*, Movie.*, User.Username from Review join Movie join User on Movie.MovieID = Review.MovieID and Review.UserID = User.UserID where Review.UserID = ?;";
dbConnection.query(sql, params, (err, results, _) => {
try {
if (err) {
Expand Down

0 comments on commit 1fbe7a8

Please sign in to comment.