Skip to content

Commit

Permalink
Created all endpoints for student
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhishekgoyal007 committed Sep 5, 2023
1 parent 7d93bb2 commit cd84df0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions controller/student.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
} from "#services/student";
import { logger } from "#util";

async function createStudent(req, res) {
async function addStudent(req, res) {
const {
ERPID, name, joiningYear, branch, division, rollNo, coursesOpted
} = req.body;
Expand Down Expand Up @@ -49,6 +49,6 @@ import {
}
}
export default {
createStudent, deleteStudentById, StudentList, updateStudentById,
addStudent, deleteStudentById, StudentList, updateStudentById,
};

2 changes: 1 addition & 1 deletion routes/student.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import express from "express";
import studentController from "#controller/student";

const router = express.Router();
router.post("/create", studentController.createStudent);
router.post("/create", studentController.addStudent);
router.get("/list", studentController.StudentList);
router.post("/update", studentController.updateStudentById);
router.post("/delete/:studentId", studentController.deleteStudentById);
Expand Down

0 comments on commit cd84df0

Please sign in to comment.