Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
ritiksr25 committed Sep 19, 2019
1 parent b0f90dd commit 6e66987
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions middleware/validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ module.exports.volunteerValidation = (req, res, next) => {
heardFrom,
workSpan,
skills,
suggestion
suggestion,
projects
} = req.body;

// checking required fields
Expand All @@ -54,7 +55,8 @@ module.exports.volunteerValidation = (req, res, next) => {
!college ||
// !aboutUddeshhya ||
!heardFrom ||
!workSpan
!workSpan ||
!projects
) {
res.status(400).json({ message: 'Some required fields are missing!!' });
}
Expand Down
4 changes: 4 additions & 0 deletions models/Volunteer.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ const Volunteerschema = new mongoose.Schema(
},
suggestion: {
type: String
},
projects: {
type: String,
required: true
}
},
{ timestamps: true }
Expand Down

0 comments on commit 6e66987

Please sign in to comment.