feat: Minor fixes (#73)

* feat: Address JPs Feedback

* fix: settings config

* fix: fix tests
This commit is contained in:
Khaled Garbaya
2017-11-30 12:46:30 +01:00
committed by GitHub
parent ffc2df6a41
commit b456500c9f
9 changed files with 20 additions and 19 deletions

View File

@@ -59,7 +59,7 @@ module.exports.getSettings = async (request, response, next) => {
module.exports.postSettings = async (request, response, next) => {
const currentLocale = response.locals.currentLocale
let errorList = []
const { spaceId, deliveryToken, previewToken, editorialFeatures } = request.body
const { spaceId, deliveryToken, previewToken, editorialFeatures, qs } = request.body
const settings = {
spaceId,
deliveryToken,
@@ -165,11 +165,11 @@ module.exports.postSettings = async (request, response, next) => {
]
}
}, {})
await renderSettings(response, {
settings,
errors,
hasErrors: errorList.length > 0,
success: errorList.length === 0
success: errorList.length === 0,
queryString: qs
})
}