Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. router.get('/:id', (req, res) => {
  2. Models.Community.where({
  3. id: req.params.id,
  4. }).fetch({
  5. require: true,
  6. withRelated: ['profiles'],
  7. }).then((data) => {
  8. res.render('app/communities/index', {
  9. community: data.attributes,
  10. profiles: data.relations.profiles.models,
  11. });
  12. });
  13. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement