Guest User

Untitled

a guest
Jan 18th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. const cvSchema = new Schema({
  2. title: String,
  3. personalData: [{
  4. title: String,
  5. description: String
  6. }],
  7. academicData: [{
  8. title: String,
  9. description: String
  10. }],
  11. professionalData: [{
  12. title: String,
  13. description: String
  14. }],
  15. offTopic: [{
  16. title: String,
  17. description: String
  18. }],
  19. skills: [{
  20. description: String,
  21. progress: {type: Number, default: 0}
  22. }]
  23. });
  24.  
  25. module.exports = mongoose.model('cv', cvSchema);
  26.  
  27. function saveCv(req, res){
  28. var params = req.body
  29. var cv = new Cv();
  30. cv.title = params.title;
  31.  
  32. cv.save((err, cv) => {
  33. if (err) { return res.send({message: err}); }
  34. return res.send({cv: cv});
  35. });
  36. }
Add Comment
Please, Sign In to add comment