diff --git a/controllers/setLanguage.js b/controllers/setLanguage.js index cfb730f..ee2d099 100644 --- a/controllers/setLanguage.js +++ b/controllers/setLanguage.js @@ -3,10 +3,10 @@ module.exports = function (server) { - server.get('/setlanguage', function (req, res) { - var model = { name: 'kraken-example-shopping-cart' }; + server.get('/setlanguage/:lang', function (req, res) { - res.render('setlanguage', model); + res.cookie('language', req.param('lang')); + res.redirect('/'); });