mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
5aab41931f
refs https://github.com/TryGhost/Ghost/issues/12602 Member Events in general are read-only after they've been created, so we've explicitly disallowed destroying and editing via the model
59 lines
992 B
JavaScript
59 lines
992 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',
|
|
'member-subscribe-event',
|
|
'posts-meta',
|
|
'member-stripe-customer',
|
|
'stripe-customer-subscription',
|
|
'email',
|
|
'email-batch',
|
|
'email-recipient',
|
|
'label',
|
|
'single-use-token',
|
|
'snippet',
|
|
// Action model MUST be loaded last as it loops through all of the registered models
|
|
// Please do not append items to this array.
|
|
'action'
|
|
];
|
|
|
|
function init() {
|
|
exports.Base = require('./base');
|
|
|
|
models.forEach(function (name) {
|
|
_.extend(exports, require('./' + name));
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Expose `init`
|
|
*/
|
|
|
|
exports.init = init;
|