Commit 485cd218 authored by AravindR-K's avatar AravindR-K

Fix : Interview not creating bug fixed

parent db700d73
......@@ -27,14 +27,10 @@ router.post('/', authorize('admin', 'hr', 'pm'), async (req, res) => {
return res.status(400).json({ message: 'Candidate and position are required' });
}
// Validate candidate exists and is a candidate
// Validate candidate exists
const candidate = await User.findById(candidateId);
if (!candidate) return res.status(404).json({ message: 'Candidate not found' });
// Validate interviewer exists
const interviewer = await User.findById(interviewerId);
if (!interviewer) return res.status(404).json({ message: 'Interviewer not found' });
// Build quiz array if quiz IDs provided
let quizzes = [];
if (quizIds && quizIds.length > 0) {
......
......@@ -86,7 +86,7 @@
<table class="history-table">
<thead>
<tr>
<th>#</th>
<th>Interview ID</th>
<th>Position</th>
<th>Interviewer</th>
<th>Quizzes</th>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment