feat: Minor fixes (#73)
* feat: Address JPs Feedback * fix: settings config * fix: fix tests
This commit is contained in:
@@ -31,6 +31,6 @@ module.exports.getLandingPage = async (request, response, next) => {
|
||||
if (shouldAttachEntryState(response)) {
|
||||
landingPage = await attachEntryState(landingPage)
|
||||
}
|
||||
|
||||
console.log(landingPage.fields.contentModules[0].fields.course.fields.image)
|
||||
response.render('landingPage', { title: pathname, landingPage })
|
||||
}
|
||||
|
||||
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user