Moved RoutesHandler into settings module

- To keep in convention with settings described in - https://github.com/TryGhost/Ghost/issues/9528 , extracted routes handler into separate settings folder
This commit is contained in:
Nazar Gargol 2019-06-20 16:58:26 +02:00
parent dc68f37b86
commit 61dc9e8c24
4 changed files with 8 additions and 7 deletions

View File

@ -17,9 +17,5 @@ module.exports = {
get TaxonomyRouter() {
return require('./TaxonomyRouter');
},
get settings() {
return require('./SettingsHandler');
}
};

View File

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

View File

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