dchester / epilogue

Create flexible REST endpoints and controllers from Sequelize models in your Express app
846 stars 116 forks source link

res.render not working inside milestone #177

Closed luckypur closed 8 years ago

luckypur commented 8 years ago

What i am trying to do is check user agent string and if it is a BOT then returning some html with meta tags.

 myResource.read.fetch.after(function (req, res, context) {

    if (req.useragent.is_bot) {
        res.render('path/to/some/template', {someData : context.instance})
        context.skip()
    }
    context.continue()
 });

Its giving app.render is not a function Any suggestion or any alternative way Or res.render just not supposed to work in milestones...!

luckypur commented 8 years ago

i was overriding req.app property somewhere in nested routes.