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

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -