From 912564ae2e22b48e1d895afa387d230b96cdfc0e Mon Sep 17 00:00:00 2001 From: JacinthaDev Date: Fri, 29 Dec 2023 23:41:13 -0500 Subject: [PATCH] Add routes for team member profiles and changed controller file name --- server/controllers/{ourTeam.js => team.js} | 0 server/routes/team.js | 7 +++++++ server/server.js | 2 ++ 3 files changed, 9 insertions(+) rename server/controllers/{ourTeam.js => team.js} (100%) create mode 100644 server/routes/team.js diff --git a/server/controllers/ourTeam.js b/server/controllers/team.js similarity index 100% rename from server/controllers/ourTeam.js rename to server/controllers/team.js diff --git a/server/routes/team.js b/server/routes/team.js new file mode 100644 index 0000000..3c2651a --- /dev/null +++ b/server/routes/team.js @@ -0,0 +1,7 @@ +import express from "express" +const router = express.Router() +import { getTeamMembers } from "../controllers/team.js" + +router.get("/team", getTeamMembers); + +export { router } \ No newline at end of file diff --git a/server/server.js b/server/server.js index d73d5ec..914693e 100644 --- a/server/server.js +++ b/server/server.js @@ -12,6 +12,7 @@ import { router as fridgeRoutes } from "./routes/fridge.js" import { router as postRoutes } from "./routes/posts.js" import { router as profileRoutes } from "./routes/profile.js" import { router as mainRoutes } from "./routes/main.js" +import { router as teamRoutes } from "./routes/team.js" import dotenv from "dotenv" import path from "path" @@ -80,6 +81,7 @@ app.use("/", mainRoutes) app.use("/fridge", fridgeRoutes) app.use("/post", postRoutes) app.use("/profile", profileRoutes) +app.use("/team", teamRoutes) // Serve React App