var express = require('express');
var router = express.Router();
var templateArgs = require('../src/templateArgs.js');

/* GET home page. */
router.get('/', function(req, res) {
  templateArgs.needLogin(req, res).then(() => {
    templateArgs.generate(req).then(args => {
      args.title = "Totoro Book - Settings";
      res.render('settings', args);
    });
  });
});

module.exports = router;
