feat(settings): Save settings in cookie

This commit is contained in:
Khaled Garbaya
2017-09-25 12:53:19 +02:00
committed by Benedikt Rötsch
parent 3373ff282d
commit 354df3c4b4
4 changed files with 38 additions and 4 deletions

View File

@@ -3,7 +3,9 @@ const { createClient } = require('contentful')
const client = createClient({space: process.env.CF_SPACE, accessToken: process.env.CF_ACCESS_TOKEN})
export function getCourses () {
// TODO
// to get all the courses we simply request from Contentful all the entries
// with the content_type `course`
return client.getEntries({content_type: 'course'})
}
export function getLessons (courseId) {