From e87af158bef510e5261c77bb94e7d511f7a27bc2 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Mon, 25 Feb 2019 19:20:17 +0700 Subject: [PATCH] Removed usage of /configuration/private/ endpoint --- ghost/admin/app/controllers/setup/two.js | 1 - ghost/admin/app/routes/application.js | 2 -- ghost/admin/app/services/config.js | 8 -------- ghost/admin/mirage/config/configuration.js | 10 ---------- ghost/admin/mirage/fixtures/private.js | 3 --- 5 files changed, 24 deletions(-) delete mode 100644 ghost/admin/mirage/fixtures/private.js diff --git a/ghost/admin/app/controllers/setup/two.js b/ghost/admin/app/controllers/setup/two.js index 18e61c9e5c..dd5d1ba49a 100644 --- a/ghost/admin/app/controllers/setup/two.js +++ b/ghost/admin/app/controllers/setup/two.js @@ -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')) { diff --git a/ghost/admin/app/routes/application.js b/ghost/admin/app/routes/application.js index 90b65c9e6e..71e8a7d19e 100644 --- a/ghost/admin/app/routes/application.js +++ b/ghost/admin/app/routes/application.js @@ -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; diff --git a/ghost/admin/app/services/config.js b/ghost/admin/app/services/config.js index edf91e8641..19842ffc1c 100644 --- a/ghost/admin/app/services/config.js +++ b/ghost/admin/app/services/config.js @@ -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'); diff --git a/ghost/admin/mirage/config/configuration.js b/ghost/admin/mirage/config/configuration.js index b4348df4cd..39af249f29 100644 --- a/ghost/admin/mirage/config/configuration.js +++ b/ghost/admin/mirage/config/configuration.js @@ -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] - }; - }); } diff --git a/ghost/admin/mirage/fixtures/private.js b/ghost/admin/mirage/fixtures/private.js deleted file mode 100644 index 711c7ba693..0000000000 --- a/ghost/admin/mirage/fixtures/private.js +++ /dev/null @@ -1,3 +0,0 @@ -export default [{ - unsplashAPI: '' -}];