mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-18 16:01:40 +03:00
01ae7ae49f
- subscriber model - subscriber app updates - subscriber end points - import/export CSV - added headers to export file - added dynamic email field detection for import - returns stats object after CSV import - mask error message from DB
24 lines
825 B
JavaScript
24 lines
825 B
JavaScript
var _ = require('lodash'),
|
|
path = require('path'),
|
|
config = require('../../config'),
|
|
router = require('./lib/router'),
|
|
|
|
// Dirty require
|
|
template = require('../../helpers/template');
|
|
|
|
module.exports = {
|
|
activate: function activate(ghost) {
|
|
// Correct way to register a helper from an app
|
|
ghost.helpers.register('form_subscribe', function formSubscribeHelper(options) {
|
|
var data = _.merge({}, options.hash, {
|
|
action: path.join('/', config.paths.subdir, config.routeKeywords.subscribe, '/')
|
|
});
|
|
return template.execute('form_subscribe', data, options);
|
|
});
|
|
},
|
|
|
|
setupRoutes: function setupRoutes(blogRouter) {
|
|
blogRouter.use('/' + config.routeKeywords.subscribe + '/', router);
|
|
}
|
|
};
|