fixup! fixup! fix(errors): properly output API error information
This commit is contained in:
committed by
Khaled Garbaya
parent
fd6de6ef86
commit
8abd754f02
@@ -164,9 +164,13 @@ module.exports.postSettings = async (request, response, next) => {
|
|||||||
updateCookie(response, SETTINGS_NAME, settings)
|
updateCookie(response, SETTINGS_NAME, settings)
|
||||||
response.locals.settings = settings
|
response.locals.settings = settings
|
||||||
|
|
||||||
const settingsQuery = {
|
const settingsQuery = Object.assign({}, request.query, {
|
||||||
|
space_id: response.locals.settings.spaceId,
|
||||||
|
delivery_token: response.locals.settings.deliveryToken,
|
||||||
|
preview_token: response.locals.settings.previewToken,
|
||||||
editorial_features: response.locals.settings.editorialFeatures ? 'enabled' : 'disabled'
|
editorial_features: response.locals.settings.editorialFeatures ? 'enabled' : 'disabled'
|
||||||
}
|
})
|
||||||
|
|
||||||
const settingsQs = querystring.stringify(settingsQuery)
|
const settingsQs = querystring.stringify(settingsQuery)
|
||||||
response.locals.queryStringSettings = settingsQs ? `?${settingsQs}` : ''
|
response.locals.queryStringSettings = settingsQs ? `?${settingsQs}` : ''
|
||||||
// Reinit clients
|
// Reinit clients
|
||||||
|
|||||||
Reference in New Issue
Block a user