Ghost/core/server/models/index.js
kirrg001 b79a18ca8f 🎨 Separate invites from user
refs #7420
- remove invite logic from user
- add invite model and adapt affected logic for inviting team members
2016-09-26 11:08:43 +02:00

48 lines
647 B
JavaScript

/**
* Dependencies
*/
var _ = require('lodash'),
exports,
models;
// enable event listeners
require('./base/listeners');
/**
* Expose all models
*/
exports = module.exports;
models = [
'accesstoken',
'app-field',
'app-setting',
'app',
'client-trusted-domain',
'client',
'permission',
'post',
'refreshtoken',
'role',
'settings',
'subscriber',
'tag',
'user',
'invite'
];
function init() {
exports.Base = require('./base');
models.forEach(function (name) {
_.extend(exports, require('./' + name));
});
}
/**
* Expose `init`
*/
exports.init = init;