0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Revert "Moved route settings to server"

This reverts commit 3c36af63cf.
This commit is contained in:
Hannah Wolfe 2021-06-30 10:52:19 +01:00
parent 4ef2ae4436
commit ed46f31c71
No known key found for this signature in database
GPG key ID: 9F8C7532D0A6BA55
6 changed files with 15 additions and 12 deletions

View file

@ -7,6 +7,10 @@ module.exports = {
return require('./registry');
},
get settings() {
return require('./settings');
},
get helpers() {
return require('./helpers');
},

View file

@ -2,9 +2,9 @@ const Promise = require('bluebird');
const moment = require('moment-timezone');
const fs = require('fs-extra');
const path = require('path');
const urlService = require('../../../frontend/services/url');
const urlService = require('../url');
const debug = require('@tryghost/debug')('services:route-settings');
const debug = require('@tryghost/debug')('services:frontend:routing:settings');
const errors = require('@tryghost/errors');
const tpl = require('@tryghost/tpl');
const config = require('../../../shared/config');

View file

@ -2,7 +2,7 @@ const Promise = require('bluebird');
const _ = require('lodash');
const validator = require('@tryghost/validator');
const models = require('../../models');
const routeSettings = require('../../services/route-settings');
const frontendRouting = require('../../../frontend/services/routing');
const frontendSettings = require('../../../frontend/services/settings');
const i18n = require('../../../shared/i18n');
const {BadRequestError, NoPermissionError, NotFoundError} = require('@tryghost/errors');
@ -328,7 +328,7 @@ module.exports = {
method: 'edit'
},
async query(frame) {
await routeSettings.setFromFilePath(frame.file.path);
await frontendRouting.settings.setFromFilePath(frame.file.path);
const getRoutesHash = () => frontendSettings.getCurrentHash('routes');
await settingsService.syncRoutesHash(getRoutesHash);
}
@ -348,7 +348,7 @@ module.exports = {
method: 'browse'
},
query() {
return routeSettings.get();
return frontendRouting.settings.get();
}
}
};

View file

@ -1,7 +1,7 @@
const Promise = require('bluebird');
const _ = require('lodash');
const models = require('../../models');
const routeSettings = require('../../services/route-settings');
const frontendRouting = require('../../../frontend/services/routing');
const frontendSettings = require('../../../frontend/services/settings');
const i18n = require('../../../shared/i18n');
const {NoPermissionError, NotFoundError} = require('@tryghost/errors');
@ -168,7 +168,7 @@ module.exports = {
method: 'edit'
},
async query(frame) {
await routeSettings.setFromFilePath(frame.file.path);
await frontendRouting.settings.setFromFilePath(frame.file.path);
const getRoutesHash = () => frontendSettings.getCurrentHash('routes');
await settingsService.syncRoutesHash(getRoutesHash);
}
@ -188,7 +188,7 @@ module.exports = {
method: 'browse'
},
query() {
return routeSettings.get();
return frontendRouting.settings.get();
}
}
};

View file

@ -2,7 +2,7 @@ const Promise = require('bluebird');
const _ = require('lodash');
const validator = require('@tryghost/validator');
const models = require('../../models');
const routeSettings = require('../../services/route-settings');
const frontendRouting = require('../../../frontend/services/routing');
const frontendSettings = require('../../../frontend/services/settings');
const i18n = require('../../../shared/i18n');
const {BadRequestError, NoPermissionError, NotFoundError} = require('@tryghost/errors');
@ -313,7 +313,7 @@ module.exports = {
method: 'edit'
},
async query(frame) {
await routeSettings.settings.setFromFilePath(frame.file.path);
await frontendRouting.settings.setFromFilePath(frame.file.path);
const getRoutesHash = () => frontendSettings.getCurrentHash('routes');
await settingsService.syncRoutesHash(getRoutesHash);
}
@ -333,7 +333,7 @@ module.exports = {
method: 'browse'
},
query() {
return routeSettings.settings.get();
return frontendRouting.settings.get();
}
}
};

View file

@ -1 +0,0 @@
module.exports = require('./route-settings');