Skip to content

Instantly share code, notes, and snippets.

@pillows
Created June 13, 2019 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pillows/24699adc073f803cdcb63df2ec0e15c4 to your computer and use it in GitHub Desktop.
Save pillows/24699adc073f803cdcb63df2ec0e15c4 to your computer and use it in GitHub Desktop.
Student.findOne({
where:{id:studentId},
include:[Campus]
}).then((student) => {
console.log(student)
student.update({
campusId:campusId
})
res.status(200).json({status:"success"});
}).catch((err)=>{
console.log(err)
res.status(400).json({status:"fuck u"});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment