2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

Moved settings dynamicRouting to routing.settings

This commit is contained in:
Nazar Gargol 2019-06-21 16:34:17 +02:00
parent a84c15689e
commit c7522f896b
5 changed files with 10 additions and 11 deletions

View file

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

View file

@ -1,5 +0,0 @@
module.exports = {
get dynamicRouting() {
return require('./dynamic-routing');
}
};

View file

@ -5,7 +5,7 @@ const Promise = require('bluebird'),
models = require('../../models'),
canThis = require('../../services/permissions').canThis,
localUtils = require('./utils'),
frontendSettings = require('../../../frontend/services/settings'),
routing = require('../../../frontend/services/routing'),
common = require('../../lib/common'),
settingsCache = require('../../services/settings/cache'),
docName = 'settings';
@ -254,14 +254,14 @@ settings = {
upload(options) {
return localUtils.handlePermissions('settings', 'edit')(options)
.then(() => {
return frontendSettings.dynamicRouting.setFromFilePath(options.path);
return routing.settings.setFromFilePath(options.path);
});
},
download(options) {
return localUtils.handlePermissions('settings', 'browse')(options)
.then(() => {
return frontendSettings.dynamicRouting.get();
return routing.settings.get();
});
}
};

View file

@ -1,7 +1,7 @@
const Promise = require('bluebird');
const _ = require('lodash');
const models = require('../../models');
const frontendSettings = require('../../../frontend/services/settings');
const routing = require('../../../frontend/services/routing');
const common = require('../../lib/common');
const settingsCache = require('../../services/settings/cache');
@ -147,7 +147,7 @@ module.exports = {
method: 'edit'
},
query(frame) {
return frontendSettings.dynamicRouting.setFromFilePath(frame.file.path);
return routing.settings.setFromFilePath(frame.file.path);
}
},
@ -165,7 +165,7 @@ module.exports = {
method: 'browse'
},
query() {
return frontendSettings.dynamicRouting.get();
return routing.settings.get();
}
}
};