Skip to content

Commit

Permalink
fx
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothy-py committed May 28, 2024
1 parent e88475f commit 4f2da03
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions controllers/jobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ exports.create = asyncHandler(async (req, res, next) => {
}

const { error, value } = validateCreateJob(input);
console.log('Error:', error);
if (error) return res.status(400).send(errorMessage);
if (error) return res.status(400).send(error);

let expiry = input.expiry ? input.expiry : 30; // default expiry days
// calculate expiry date
Expand Down Expand Up @@ -593,7 +592,7 @@ exports.applyJob = asyncHandler(async (req, res, next) => {
exports.formJobApply = async (req, res) => {
try {
const { error, value } = validateApplyJobSchema(req.body);
if (error) return res.status(400).send(errorMessage);
if (error) return res.status(400).send(error);

const jobId = req.params.jobId;
const job = await Jobs.findById(jobId).select({
Expand Down

0 comments on commit 4f2da03

Please sign in to comment.