feat(about): attach settings to links in about modal

This commit is contained in:
Benedikt Rötsch
2018-01-24 16:34:47 +01:00
committed by Benedikt Rötsch
parent 67a73599bb
commit 2706e31411
2 changed files with 11 additions and 5 deletions

6
app.js
View File

@@ -54,7 +54,13 @@ app.use(catchErrors(async function (request, response, next) {
// Make query string available in templates to render links properly
const qs = querystring.stringify(request.query)
const settingsQs = querystring.stringify(Object.assign({}, request.query, {
space_id: response.locals.settings.spaceId,
preview_token: response.locals.settings.previewToken,
delivery_token: response.locals.settings.deliveryToken
}))
response.locals.queryString = qs ? `?${qs}` : ''
response.locals.queryStringSettings = settingsQs ? `?${settingsQs}` : ''
response.locals.query = request.query
response.locals.currentPath = request.path