From 85d5e0faedf2ddc8788894ee7bef8a7226da14e3 Mon Sep 17 00:00:00 2001 From: Khaled Garbaya Date: Tue, 7 Nov 2017 11:49:31 +0100 Subject: [PATCH] fix: fix application name --- services/contentful.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/contentful.js b/services/contentful.js index fd5bbf8..ce00772 100644 --- a/services/contentful.js +++ b/services/contentful.js @@ -15,6 +15,7 @@ let previewClient = null module.exports.initClients = (options) => { // Getting the app version const { version } = require('../package.json') + const applicationName = `the-example-app.nodejs/${version}` const config = options || { spaceId: process.env.CF_SPACE_ID, @@ -22,12 +23,12 @@ module.exports.initClients = (options) => { previewToken: process.env.CF_PREVIEW_TOKEN } deliveryClient = createClient({ - application: `the-example-app.node/${version}`, + application: applicationName, space: config.spaceId, accessToken: config.deliveryToken }) previewClient = createClient({ - application: `the-example-app.node/${version}`, + application: applicationName, space: config.spaceId, accessToken: config.previewToken, host: 'preview.contentful.com'