Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Customer.update({
- cid: req.body.cid,
- pass: req.body.pass,
- name: req.body.name,
- address: req.body.address,
- cnic: req.body.cnic,
- mobile: req.body.mobile,
- packageid: req.body.packageid,
- status: req.body.status,
- active_dt: req.body.active_dt,
- exp_dt: req.body.exp_dt,
- payment: req.body.payment,
- bal: req.body.bal
- },
- {
- where: {
- id: req.params.id
- }
- }).then(Custom => {
- Package.findAll({
- where: {
- pname: {
- [Op.or]: req.body.packname
- }
- }
- }).then(packname => {
- Custom.setPackageRef(packname).then(() => {
- res.send({ message: 'Update successfully!' });
- });
- }).catch(err => {
- res.status(500).send({ reason: err.message });
- });
- }).catch(err => {
- res.status(500).send({ reason: err.message });
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement