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( app.get(
"/exercises/:_id", "/exercises/:_id",
asyncHandler(async (req, res) => { asyncHandler(async (req, res) => {
const exerciseId = req.params._id; const exercise = await exercises.findExerciseById(req.params._id);
const exercise = await exercises.findExerciseById(exerciseId);
if (exercise !== null) { if (exercise !== null) {
res.status(200).json(exercise); res.status(200).json(exercise);
} else { } else {