diff --git a/api/src/controllers/mentorController.ts b/api/src/controllers/mentorController.ts index ee77fd1..fd3ea35 100644 --- a/api/src/controllers/mentorController.ts +++ b/api/src/controllers/mentorController.ts @@ -2,7 +2,10 @@ import { Request, Response } from "express"; import { Mentor } from "../model/Mentor"; // Get all mentees and their workshops for a given mentor -export const getMenteesForMentor = async (req: Request, res: Response): Promise => { +export const getMenteesForMentor = async ( + req: Request, + res: Response, +): Promise => { try { const { mentorId } = req.params; diff --git a/api/src/routes/mentee.ts b/api/src/routes/mentee.ts index 6b5eeac..f750861 100644 --- a/api/src/routes/mentee.ts +++ b/api/src/routes/mentee.ts @@ -10,7 +10,9 @@ router.get("/:menteeId/workshops", async (req, res) => { const workshops = await Workshop.find({ mentee: menteeId }); res.status(200).json(workshops); } catch (error) { - res.status(500).json({ message: "Error retrieving workshops for mentee", error }); + res + .status(500) + .json({ message: "Error retrieving workshops for mentee", error }); } }); diff --git a/api/src/server.ts b/api/src/server.ts index 60a1b30..0e6362a 100644 --- a/api/src/server.ts +++ b/api/src/server.ts @@ -20,7 +20,6 @@ app.use("/workshop", routes.workshop); connectDB(); - app.use("/api", router); // connect routes (prefix as api), what is the lin 7 logic for?: import * as routes from "./routes/index" app.listen(process.env.PORT || 8000, () =>