Created
February 17, 2017 15:03
-
-
Save bobbravo2/915658d507e17b6861e68dcbb54f870c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.get("/Veteran/:id", function(req, res) { | |
db.Employer.findOne({ | |
where: { | |
id: req.params.id | |
} | |
}).then(function(dbEmployer){ | |
var values = dbEmployer.dataValues; | |
var company_hbsObject = { | |
company_name: values.company_name, | |
company_firstName: values.first_name, | |
company_lastName: values.last_name, | |
company_phoneNumber: values.phone_number, | |
company_email: values.email, | |
company_address: values.address, | |
company_city: values.city, | |
company_state: values.state, | |
company_zip: values.zip, | |
} | |
db.Veteran.findOne({ | |
where: { | |
id: req.params.id | |
} | |
}).then(function(dbVeterans){ | |
var values = dbVeterans.dataValues; | |
var hbsObject = { | |
rank: values.rank, | |
firstName: values.firstName, | |
lastName: values.lastName, | |
phoneNumber: values.phoneNumber, | |
email: values.email, | |
address1: values.address1, | |
city: values.city, | |
state: values.state, | |
zip: values.zip, | |
} | |
// console.log(hbsObject); | |
res.render("veteran", hbsObject, company_hbsObject); | |
}) | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment