fix: Fix New fields naming

This commit is contained in:
Khaled Garbaya
2017-10-17 11:59:09 +02:00
committed by Benedikt Rötsch
parent 418871c6cf
commit c6d12b4afd
9 changed files with 19 additions and 15 deletions

View File

@@ -48,12 +48,15 @@ exports.getCourses = assert((locale = 'en-US', api = `cda`) => {
exports.getLandingPage = (slug, locale = 'en-US', api = `cda`) => {
const client = api === 'cda' ? cdaClient : cpaClient
return client.getEntries({
content_type: 'landingPage',
content_type: 'layout',
locale,
'fields.slug': slug,
include: 10
})
.then((response) => response.items[0])
.then((response) => {
console.log(response.items[0])
return response.items[0]
})
}
// the SDK supports link resolution only when you call the collection endpoints