feat: Add new diffing

This commit is contained in:
Khaled Garbaya
2017-12-13 15:48:23 +01:00
committed by Khaled Garbaya
parent fec1fa8a41
commit 4344b6ff6b
3 changed files with 28 additions and 4 deletions

View File

@@ -52,8 +52,9 @@ module.exports.getSpace = assert((api = `cda`) => {
* @returns {Object}
*/
module.exports.getEntry = assert((entryId, api = `cda`) => {
return getClient(api).getEntry(entryId)
module.exports.getEntry = assert((entryId, contentType, api = `cda`) => {
return getClient(api).getEntries({content_type: contentType, 'sys.id': entryId})
.then((response) => response.items[0])
}, 'Entry')
/**