Ghost/core/server/apps/subscribers/index.js
Hannah Wolfe 7dba7b52f8 💄 Misc cleanup in middleware, helpers & apps (#7479)
no issue

- unsued code:
  - there are no public assets anymore, might need to use this instead of shared in future, but for now lets remove it to reduce confusion
  - the `input password` box was incorrectly registered as an admin helper, thinking that was needed in order to render the default template. This isn't needed.
- apps:
  - small structure & comment update to amp app
  - moving input_password helper into private blogging app
  - refactor helpers in subscribers app
2016-10-04 19:09:18 +02:00

23 lines
627 B
JavaScript

var router = require('./lib/router'),
registerHelpers = require('./lib/helpers'),
// Dirty requires
config = require('../../config'),
labs = require('../../utils/labs');
module.exports = {
activate: function activate(ghost) {
registerHelpers(ghost);
},
setupRoutes: function setupRoutes(blogRouter) {
blogRouter.use('/' + config.get('routeKeywords').subscribe + '/', function labsEnabledRouter(req, res, next) {
if (labs.isSet('subscribers') === true) {
return router.apply(this, arguments);
}
next();
});
}
};