Skip to content

Commit

Permalink
Add memberId to 2 Truths/1 Lie output
Browse files Browse the repository at this point in the history
  • Loading branch information
leeaj8-uci committed Nov 18, 2023
1 parent a529199 commit 0e546f9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions routes/gameRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ gameRouter.get('/truthslies/:memberId', async (req, res) => {
const truths = await db.query(`SELECT truth FROM truths WHERE member_id = $1 LIMIT 2;`, [memberId]);
const [{lie}] = await db.query(`SELECT lie FROM lies WHERE member_id = $1 LIMIT 1;`, [memberId]);
res.status(200).json({
memberId,
truths: truths.map(({truth}) => (truth)),
lie
});
Expand Down

0 comments on commit 0e546f9

Please sign in to comment.