Last active
December 17, 2015 17:08
-
-
Save joepie91/f3ff7b1ea463b5bd1910 to your computer and use it in GitHub Desktop.
This file contains 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
AuctionController.getAll = function() { | |
return collections.AuctionCollection.forge().fetch(); | |
}; |
This file contains 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
router.get('/', function(request, response, next) { | |
Promise.try(function() { | |
return AuctionController.getAll(); | |
}).then(function(data) { | |
//response.send(data); | |
res.render('list-auctions'); | |
}).catch(function(err) { | |
response.status(500).send({error: err}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment