Skip to content

Commit

Permalink
Merge pull request #52 from Tekken-Supporter/feature/sw0501
Browse files Browse the repository at this point in the history
Fix: match api 오류 수정
  • Loading branch information
sw0501 authored Nov 28, 2023
2 parents a9b5c5f + b6c20c5 commit 7a8c946
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routes/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ router.get('/match/:id',async(req,res)=>{

const connection = await db.return_connection();

let SQL = "select match_id, ifnull(loser,challenger) as loser, ifnull(winner,contender) as winner, losescore, winscore, challenger, contender, applymessage, creationDate from matches ";
SQL += "left join challenge on match_id = challenge_id";
let SQL = "select match_id, ifnull(loser,challenger) as loser, ifnull(winner,contender) as winner, losescore, winscore, challenger, contender, applymessage, creationDate from matches ";
SQL += "left join challenge on match_id = challenge_id ";
SQL += "where contender = (select name from userinfo where id = ?) or challenger = (select name from userinfo where id = ?) order by matchDate desc;";

connection.query(SQL, [user_id, user_id], function(err,results,field){
Expand Down

0 comments on commit 7a8c946

Please sign in to comment.