This commit is contained in:
RochesterX
2025-11-29 19:11:35 -05:00
parent b00f9e53f1
commit 3437c10f65
2 changed files with 3 additions and 5 deletions

View File

@@ -111,7 +111,7 @@ app.post("/getWatchlist", authenticate, async (req, res) => {
const watchlist = await pool.request()
.input("userID", sql.Int, req.user.Id)
.input("id", sql.Int, id)
.query(`SELECT Player.PlayerName, Player.Team, Player.Position, Player.PlayerID FROM Watch JOIN Player ON Watch.PlayerID = Player.PlayerID WHERE UserID = @userID`);
.query(`SELECT Player.PlayerName, Player.Team, Player.Position, Player.PlayerID FROM Watch JOIN Player ON Watch.PlayerID = Player.PlayerID WHERE UserID = @userID ORDER BY Player.PlayerName`);
res.status(200).json({ watchlist: watchlist.recordset });
});