Skip to content

Commit

Permalink
updated rating range
Browse files Browse the repository at this point in the history
  • Loading branch information
RbAvci committed May 22, 2024
1 parent f0b5a8c commit 8ef7e35
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions server/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ router.put("/videos/:id/rating", async (req, res) => {
const videoId = req.params.id;
const { rating } = req.body;

if (rating < 0 || rating > 5) {
return res.status(400).json({ error: "Invalid rating value" });
}

try {
const result = await db.query(`SELECT * FROM videos WHERE id=${videoId}`);
let video = result.rows[0];
Expand Down

0 comments on commit 8ef7e35

Please sign in to comment.