I'm using a koa-router, koa-views and sequelize. Data comes from a database, but the status = 404. What am I doing wrong?
router.get('/', function *() {
var ctx = this;
yield models.drivers.findAll({
where: {
userId: ctx.passport.user.id
}
}).then(function(drivers) {
ctx.render('driversSearch', {
drivers: drivers
});
});
});