d3f3b3dc20
refs #10124 - Author model returns only users that have published non-page posts - Added a public controller for tags (should be extracted to separate Content API controller https://github.com/TryGhost/Ghost/issues/10106) - Made resource configuration dynamic based on current theme engine - This needs a follow-up PR with fixes to the problems described in the PR
56 lines
783 B
JavaScript
56 lines
783 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',
|
|
'tag-public',
|
|
'user',
|
|
'author',
|
|
'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;
|