Skip to content

Commit

Permalink
Removed private configuration endpoint
Browse files Browse the repository at this point in the history
refs #8859

- We don't need the config option for Unsplash anymore
- The private endpoint (/configuration/private) was introduced for Unsplash
  • Loading branch information
kirrg001 authored and kevinansfield committed Sep 20, 2017
1 parent edf2348 commit 79fead5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
13 changes: 0 additions & 13 deletions core/server/api/configuration.js
Expand Up @@ -14,14 +14,6 @@ function fetchAvailableTimezones() {
return timezones;
}

function fetchPrivateConfig() {
var unsplashConfig = config.get('unsplash') || {};

return {
unsplashAPI: unsplashConfig
};
}

function getAboutConfig() {
return {
version: ghostVersion.full,
Expand Down Expand Up @@ -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: []});
}
};
Expand Down
17 changes: 0 additions & 17 deletions core/test/integration/api/api_configuration_spec.js
Expand Up @@ -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);
});
});

0 comments on commit 79fead5

Please sign in to comment.