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

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -