diff --git a/core/server/api/configuration.js b/core/server/api/configuration.js index c491b6ebcd..282ae5b239 100644 --- a/core/server/api/configuration.js +++ b/core/server/api/configuration.js @@ -14,14 +14,6 @@ function fetchAvailableTimezones() { return timezones; } -function fetchPrivateConfig() { - var unsplashConfig = config.get('unsplash') || {}; - - return { - unsplashAPI: unsplashConfig - }; -} - function getAboutConfig() { return { version: ghostVersion.full, @@ -81,11 +73,6 @@ configuration = { return Promise.resolve({configuration: [fetchAvailableTimezones()]}); } - // Private configuration config for API keys used by the client - if (options.key === 'private') { - return Promise.resolve({configuration: [fetchPrivateConfig()]}); - } - return Promise.resolve({configuration: []}); } }; diff --git a/core/test/integration/api/api_configuration_spec.js b/core/test/integration/api/api_configuration_spec.js index e298b432e7..f7495f638e 100644 --- a/core/test/integration/api/api_configuration_spec.js +++ b/core/test/integration/api/api_configuration_spec.js @@ -71,21 +71,4 @@ describe('Configuration API', function () { done(); }).catch(done); }); - - it('can read private config and get all expected properties', function (done) { - ConfigurationAPI.read({key: 'private'}).then(function (response) { - var props; - - should.exist(response); - should.exist(response.configuration); - response.configuration.should.be.an.Array().with.lengthOf(1); - props = response.configuration[0]; - - // property is set, but value not available, because settings API was not called yet - props.should.have.property('unsplashAPI').which.is.an.Object(); - props.unsplashAPI.should.be.empty(); - - done(); - }).catch(done); - }); });