mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
Removed usage of /configuration/private/ endpoint
This commit is contained in:
parent
c6ff5e1315
commit
e87af158be
@ -178,7 +178,6 @@ export default Controller.extend(ValidationEngine, {
|
||||
// fetch settings and private config for synchronous access before transitioning
|
||||
let fetchSettingsAndConfig = RSVP.all([
|
||||
this.get('settings').fetch(),
|
||||
this.get('config').fetchPrivate()
|
||||
]);
|
||||
|
||||
if (this.get('profileImage')) {
|
||||
|
@ -55,7 +55,6 @@ export default Route.extend(ApplicationRouteMixin, ShortcutsRoute, {
|
||||
|
||||
let featurePromise = this.get('feature').fetch();
|
||||
let settingsPromise = this.get('settings').fetch();
|
||||
let privateConfigPromise = this.get('config').fetchPrivate();
|
||||
let tourPromise = this.get('tour').fetchViewed();
|
||||
|
||||
// return the feature/settings load promises so that we block until
|
||||
@ -63,7 +62,6 @@ export default Route.extend(ApplicationRouteMixin, ShortcutsRoute, {
|
||||
return RSVP.all([
|
||||
featurePromise,
|
||||
settingsPromise,
|
||||
privateConfigPromise,
|
||||
tourPromise
|
||||
]).then((results) => {
|
||||
this._appLoaded = true;
|
||||
|
@ -29,14 +29,6 @@ export default Service.extend(_ProxyMixin, {
|
||||
});
|
||||
},
|
||||
|
||||
fetchPrivate() {
|
||||
let privateConfigUrl = this.get('ghostPaths.url').api('configuration', 'private');
|
||||
|
||||
return this.get('ajax').request(privateConfigUrl).then((privateConfig) => {
|
||||
assign(this.get('content'), privateConfig.configuration[0]);
|
||||
});
|
||||
},
|
||||
|
||||
availableTimezones: computed(function () {
|
||||
let timezonesUrl = this.get('ghostPaths.url').api('configuration', 'timezones');
|
||||
|
||||
|
@ -22,14 +22,4 @@ export default function mockConfiguration(server) {
|
||||
}]
|
||||
};
|
||||
});
|
||||
|
||||
server.get('/configuration/private/', function ({db}) {
|
||||
if (isEmpty(db.private)) {
|
||||
server.loadFixtures('private');
|
||||
}
|
||||
|
||||
return {
|
||||
configuration: [db.private]
|
||||
};
|
||||
});
|
||||
}
|
||||
|
@ -1,3 +0,0 @@
|
||||
export default [{
|
||||
unsplashAPI: ''
|
||||
}];
|
Loading…
Reference in New Issue
Block a user