feat(entry-states): display entity state for editors
This commit is contained in:
@@ -26,11 +26,18 @@ exports.initClient = (options) => {
|
||||
})
|
||||
}
|
||||
|
||||
// Get the Space the app is connected to. Used for the settings form and to get all available locales.
|
||||
exports.getSpace = assert((api = `cda`) => {
|
||||
const client = api === 'cda' ? cdaClient : cpaClient
|
||||
return client.getSpace()
|
||||
}, 'Space')
|
||||
|
||||
// Get a single entry. Used to detect the `Draft` or `Pending Changes` state.
|
||||
exports.getEntry = assert((entryId, api = `cda`) => {
|
||||
const client = api === 'cda' ? cdaClient : cpaClient
|
||||
return client.getEntry(entryId)
|
||||
}, 'Entry')
|
||||
|
||||
// to get all the courses we request all the entries
|
||||
// with the content_type `course` from Contentful
|
||||
exports.getCourses = assert((locale = 'en-US', api = `cda`) => {
|
||||
|
||||
Reference in New Issue
Block a user