From eba9eed0dd79cbb39ec7dde451e39b8a1824dea6 Mon Sep 17 00:00:00 2001 From: txingxie Date: Sun, 1 Dec 2024 21:31:23 -0500 Subject: [PATCH] prettier on new routes/models --- api/src/controllers/mentorController.ts | 2 +- api/src/model/User.ts | 2 +- api/src/routes/user.ts | 2 +- api/src/server.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/controllers/mentorController.ts b/api/src/controllers/mentorController.ts index b3e9280..2840ff8 100644 --- a/api/src/controllers/mentorController.ts +++ b/api/src/controllers/mentorController.ts @@ -5,7 +5,7 @@ import User from "../model/User"; // Get all mentees and their workshops for a given mentor export const getMenteesForMentor = async ( req: Request, - res: Response + res: Response, ): Promise => { try { const { mentorId } = req.params; diff --git a/api/src/model/User.ts b/api/src/model/User.ts index a3889a6..080e593 100644 --- a/api/src/model/User.ts +++ b/api/src/model/User.ts @@ -15,4 +15,4 @@ const userSchema = new mongoose.Schema({ const User = mongoose.model("User", userSchema); -export default User; \ No newline at end of file +export default User; diff --git a/api/src/routes/user.ts b/api/src/routes/user.ts index d196fbc..565fb07 100644 --- a/api/src/routes/user.ts +++ b/api/src/routes/user.ts @@ -7,7 +7,7 @@ import User from "../model/User"; const router = express.Router(); // Call the dbConnect function to connect to MongoDB -dbConnect(); +dbConnect(); // Route to create a new user router.post("/create-user", async (req: any, res: any) => { diff --git a/api/src/server.ts b/api/src/server.ts index 493c621..62dbe00 100644 --- a/api/src/server.ts +++ b/api/src/server.ts @@ -24,5 +24,5 @@ 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, () => - console.log(`Server running on port ${process.env.PORT || 8000}`) + console.log(`Server running on port ${process.env.PORT || 8000}`), );