feat:add candidate apis
This commit is contained in:
25
backend/src/routes/candidate.routes.js
Normal file
25
backend/src/routes/candidate.routes.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import express from "express";
|
||||
import {
|
||||
createCandidate,
|
||||
getCandidates,
|
||||
getCandidate,
|
||||
getCandidatesByCareer,
|
||||
updateCandidate,
|
||||
deleteCandidate,
|
||||
} from "../controllers/candidate.controller.js";
|
||||
|
||||
import jwtAuthMiddleware from "../middleware/auth.js";
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
/* PUBLIC */
|
||||
|
||||
router.get("/getAll", getCandidates);
|
||||
router.get("/:id", getCandidate);
|
||||
router.get("/career/:careerId", getCandidatesByCareer);
|
||||
|
||||
router.post("/", createCandidate);
|
||||
router.patch("/:id", updateCandidate);
|
||||
router.delete("/:id", jwtAuthMiddleware, deleteCandidate);
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user