Ghost/core/server/models/index.js
Kevin Ansfield 6dc8d91ace Revert "Store email batch and recipient records when sending newsletters (#12195)"
This reverts commit 80af56b530.

- reverting temporarily so that all associated functionality can be merged in a single release
- creating email batch/recipient records without using them would cause inconsistent data
2020-09-21 17:02:59 +01:00

53 lines
767 B
JavaScript

/**
* Dependencies
*/
const _ = require('lodash');
// enable event listeners
require('./base/listeners');
/**
* Expose all models
*/
exports = module.exports;
const models = [
'permission',
'post',
'role',
'settings',
'session',
'tag',
'tag-public',
'user',
'author',
'invite',
'webhook',
'integration',
'api-key',
'mobiledoc-revision',
'member',
'action',
'posts-meta',
'member-stripe-customer',
'stripe-customer-subscription',
'email',
'label',
'single-use-token'
];
function init() {
exports.Base = require('./base');
models.forEach(function (name) {
_.extend(exports, require('./' + name));
});
}
/**
* Expose `init`
*/
exports.init = init;