Skip to content

Commit

Permalink
Delete redundant in ExamPhase Router
Browse files Browse the repository at this point in the history
  • Loading branch information
bentran1vn committed Oct 6, 2023
1 parent b1c1d7e commit ef40b8c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
2 changes: 1 addition & 1 deletion routes/autoCreateExamPhase.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import express from 'express'
import { createNewSemester } from './semester.js'
import { countCourse } from './course.js'
import { createExamPhases } from './examPhase'
import { createExamPhases } from './examPhase.js'
import { DataResponse } from '../common/reponses.js'

const router = express.Router()
Expand Down
25 changes: 0 additions & 25 deletions routes/examPhase.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,31 +89,6 @@ router.delete('/', async (req, res) => { // Delete Exam Phase
}
})

router.put('/updatePhase', async (req, res) => {
try {
const examPhaseId = req.body.examPhaseId
const { startDay, endDay } = req.body
const result = await ExamPhase.update(
{
startDay: startDay,
endDay: endDay,
},
{
where: {
id: examPhaseId
}
}
)
if (result) {
res.json(MessageResponse("ExamPhase Update !"))
} else {
res.status(500).json({ error: 'Internal Server Error' });
}
} catch (error) {
res.status(500).json({ error: 'Internal Server Error' });
}
})

export async function createExamPhases(course, semesterId) {
try {
const date = new Date()
Expand Down

0 comments on commit ef40b8c

Please sign in to comment.