Created
December 11, 2017 10:53
-
-
Save iamkevingreen/0de17197cd754d25079c2d7cd2ad29c0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const contentfulAPI = require('./contentful') | |
module.exports = (data) => { | |
const slug = data.fields.slug['en-US'] | |
contentfulAPI.getEntries({ | |
content_type: 'passports', | |
'fields.slug': slug, | |
include: 8 | |
}).then(({ items }) => { | |
const { fields } = items[0] | |
console.log('api fetch of fields', fields) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment