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:
parent
edf2348394
commit
79fead5516
@ -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: []});
|
||||
}
|
||||
};
|
||||
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user