mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
0bf5dd212a
refs #10213
54 lines
751 B
JavaScript
54 lines
751 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',
|
|
'session',
|
|
'subscriber',
|
|
'tag',
|
|
'user',
|
|
'invite',
|
|
'webhook',
|
|
'integration',
|
|
'api-key',
|
|
'mobiledoc-revision',
|
|
'member'
|
|
];
|
|
|
|
function init() {
|
|
exports.Base = require('./base');
|
|
|
|
models.forEach(function (name) {
|
|
_.extend(exports, require('./' + name));
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Expose `init`
|
|
*/
|
|
|
|
exports.init = init;
|