Skip to content

Commit

Permalink
Merge pull request dsckiet#12 from ritiksr25/master
Browse files Browse the repository at this point in the history
minor change
  • Loading branch information
goelaakash79 authored Sep 19, 2019
2 parents dfa719d + 6e66987 commit 5925d6b
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 5925d6b

Please sign in to comment.