several adjustments based on Malin's feedback

This commit is contained in:
Benedikt Rötsch
2017-10-06 11:21:14 +02:00
committed by Benedikt Rötsch
parent 99b755fcbc
commit 31ff2d3006
13 changed files with 68 additions and 88 deletions

View File

@@ -6,7 +6,11 @@ const router = express.Router()
/* GET settings page. */
router.get('/', catchErrors(async function (req, res, next) {
const cookie = req.cookies.theExampleAppSettings
const settings = cookie || { cpa: '', cda: '', space: '' }
const settings = cookie || {
space: process.env.CF_SPACE,
cda: process.env.CF_ACCESS_TOKEN,
cpa: process.env.CF_PREVIEW_ACCESS_TOKEN
}
res.render('settings', {
title: 'Settings',
settings,