Skip to content

Commit

Permalink
prettier on new routes/models
Browse files Browse the repository at this point in the history
  • Loading branch information
txingxie committed Dec 2, 2024
1 parent e3fcc3a commit eba9eed
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/src/controllers/mentorController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> => {
try {
const { mentorId } = req.params;
Expand Down
2 changes: 1 addition & 1 deletion api/src/model/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ const userSchema = new mongoose.Schema({

const User = mongoose.model("User", userSchema);

export default User;
export default User;
2 changes: 1 addition & 1 deletion api/src/routes/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion api/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`),
);

0 comments on commit eba9eed

Please sign in to comment.