sails.js - res.view() changes static asset path -
when using res.view('reset') of static assets (ie css , js files) prefixed reset.
example:
www.myapp.com/reset/angular.min.js <-- incorrect
www.myapp.com/angular.min.js <-- correct
i have following controller:
reset: function (req, res) { user.findone({ resetpasswordtoken: req.params.token, resetpasswordexpires: { $gt: new date(date.now()) } }, function (err, user) { if (!user) { res.notfound(); return res.backtologinpage(); } return res.view('reset') }); }
naturally, sails responding 404's because none of assets live @ path.
how res.view('reset') serve files same directory when specifying view route 'get /reset': {view: 'reset'}?
Comments
Post a Comment