Changed fetch to fetchAll() in articles endpoint

pull/1/head
Nishant Arora 9 years ago
parent 78ff9be4c5
commit 535be379ff

Binary file not shown.

@ -42,7 +42,7 @@ app.get('/articles',function(req,res){
the error key in the returning object is a boolen which is false if there is no error and true otherwise
*/
Articles.forge()
.fetch()
.fetchAll()
.then(function (collection) {
res.json({error: false, data: collection.toJSON()});
})

Loading…
Cancel
Save