mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
23f59c341c
no issue - removed the `routeKeywords` property from the config and used hard coded keywords. - removed `routeKeywords` from public configuration API endpoint, as it's no longer used in the Admin.
22 lines
683 B
JavaScript
22 lines
683 B
JavaScript
var router = require('./lib/router'),
|
|
registerHelpers = require('./lib/helpers'),
|
|
|
|
// Dirty requires
|
|
labs = require('../../services/labs');
|
|
|
|
module.exports = {
|
|
activate: function activate(ghost) {
|
|
// routeKeywords.subscribe: 'subscribe'
|
|
var subscribeRoute = '/subscribe/';
|
|
// TODO, how to do all this only if the Subscribers flag is set?!
|
|
registerHelpers(ghost);
|
|
|
|
ghost.routeService.registerRouter(subscribeRoute, function labsEnabledRouter(req, res, next) {
|
|
if (labs.isSet('subscribers') === true) {
|
|
return router.apply(this, arguments);
|
|
}
|
|
|
|
next();
|
|
});
|
|
}
|
|
};
|