Removed private configuration endpoint

refs https://github.com/TryGhost/Ghost/issues/8859

- We don't need the config option for Unsplash anymore
- The private endpoint (/configuration/private) was introduced for Unsplash
This commit is contained in:
kirrg001 2017-09-19 11:47:59 +02:00 committed by Kevin Ansfield
parent edf2348394
commit 79fead5516
2 changed files with 0 additions and 30 deletions

View File

@ -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: []});
}
};

View File

@ -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);
});
});