NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

const Standup = require('../../models/standup')

module.exports = function (router) {
// GET: the 12 newest stand-up meeting notes
router.get('/standup',function (req,res) {
Standup.find({}, (err,standup) => {
//check if error was found or not
if (err) {
res.json({ success: false,message: err}); // Return error message
} else {
// check if standup were found in database
if (!standup){
res.json({success:false,message:'No standup found.'}); // return error of no standup found
} else {
res.json({ success:true,standup: standup}); // return success and standup array
}
}
})
})

//POST: Get new meeting note document...
router.post('/standup',function(req,res){
let note = new Standup(req.body)
note.save(function (err,note){
if (err) {
return res.status(400).json(err)
}
res.status(200).json(note)
})
})

router.put('/updateStandup',(req,res) => {
//check if id is provided
if (!req.body._id) {
res.json({success:false,message:'No standup is provided'}); // return error message
} else {
// check if id exixts in databaSE
Standup.findOne({_id:req.body._id}, (err,standup) => {
//check if id is valid ID
if (err) {
res.json({ success:false,message:'Not a valid standup id'}); // return error message
} else {
standup.teamMember = req.body.teamMember;
standup.project = req.body.project;
standup.workYesterday = req.body.workYesterday;
standup.workToday = req.body.workToday;
standup.impediment = req.body.impediment;
standup.createdOn = req.body.createdOn;
standup.save((err) => {
if (err) {
res.json({success:false,message:err}); //return error message
}else {
res.json({success:true,message:'standup Updated!'}); //return success message
}
});
}
});
}
});
router.delete('/deleteStandup/:id',(req,res) => {
//check if id was provided in parameters
if(!req.params.id){
res.json({ success:false,message:'No id provided'}); //return error message
} else {
//check id id is found in database
Standup.findOne({_id: req.params.id},(err,standup) => {
//check if error was found
if (err) {
res.json({success:false,message:'Invalid id'}); // return error message
} else {
//remove the standup from database
standup.remove((err) => {
if(err) {
res.json({ success: false,message:err}); //return error message
} else{
res.json({success:true,message:'Standup deleted!'}); //return success message
}
});
}
});
}
});
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.