Remove unneeded variable 'exerciseID'

This commit is contained in:
Andrew Scott 2022-06-03 19:42:38 -04:00
parent 0484852895
commit dbb5bcc274
Signed by: a
GPG key ID: 3EB62D0BBB8DB381

View file

@ -31,8 +31,7 @@ app.get(
app.get(
"/exercises/:_id",
asyncHandler(async (req, res) => {
const exerciseId = req.params._id;
const exercise = await exercises.findExerciseById(exerciseId);
const exercise = await exercises.findExerciseById(req.params._id);
if (exercise !== null) {
res.status(200).json(exercise);
} else {