2018-10-05 00:50:45 +02:00
|
|
|
const shared = require('../shared');
|
|
|
|
const localUtils = require('./utils');
|
|
|
|
|
2018-10-03 20:45:42 +07:00
|
|
|
module.exports = {
|
2018-10-05 00:50:45 +02:00
|
|
|
get http() {
|
|
|
|
return shared.http;
|
|
|
|
},
|
|
|
|
|
2019-07-17 16:43:07 +02:00
|
|
|
get authentication() {
|
|
|
|
return shared.pipeline(require('./authentication'), localUtils);
|
|
|
|
},
|
|
|
|
|
2018-12-17 14:45:09 +01:00
|
|
|
get db() {
|
|
|
|
return shared.pipeline(require('./db'), localUtils);
|
|
|
|
},
|
|
|
|
|
2018-10-18 20:03:56 +07:00
|
|
|
get integrations() {
|
|
|
|
return shared.pipeline(require('./integrations'), localUtils);
|
|
|
|
},
|
|
|
|
|
2018-10-05 00:50:45 +02:00
|
|
|
// @TODO: transform
|
2018-10-03 20:45:42 +07:00
|
|
|
get session() {
|
|
|
|
return require('./session');
|
2018-10-05 00:50:45 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
get pages() {
|
|
|
|
return shared.pipeline(require('./pages'), localUtils);
|
2018-10-09 16:00:08 +02:00
|
|
|
},
|
|
|
|
|
2019-01-07 11:32:53 +00:00
|
|
|
get redirects() {
|
|
|
|
return shared.pipeline(require('./redirects'), localUtils);
|
|
|
|
},
|
|
|
|
|
2018-10-09 16:00:08 +02:00
|
|
|
get roles() {
|
|
|
|
return shared.pipeline(require('./roles'), localUtils);
|
2018-10-12 17:55:20 +05:30
|
|
|
},
|
|
|
|
|
|
|
|
get slugs() {
|
|
|
|
return shared.pipeline(require('./slugs'), localUtils);
|
2018-10-12 00:22:38 +05:30
|
|
|
},
|
|
|
|
|
|
|
|
get webhooks() {
|
|
|
|
return shared.pipeline(require('./webhooks'), localUtils);
|
2018-10-10 16:34:16 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
get posts() {
|
|
|
|
return shared.pipeline(require('./posts'), localUtils);
|
2018-10-12 19:44:02 +02:00
|
|
|
},
|
|
|
|
|
2018-10-12 19:44:06 +02:00
|
|
|
get invites() {
|
|
|
|
return shared.pipeline(require('./invites'), localUtils);
|
|
|
|
},
|
|
|
|
|
2018-10-12 19:44:05 +02:00
|
|
|
get mail() {
|
|
|
|
return shared.pipeline(require('./mail'), localUtils);
|
|
|
|
},
|
|
|
|
|
2018-10-12 19:44:03 +02:00
|
|
|
get notifications() {
|
|
|
|
return shared.pipeline(require('./notifications'), localUtils);
|
|
|
|
},
|
|
|
|
|
2018-10-12 19:44:02 +02:00
|
|
|
get settings() {
|
|
|
|
return shared.pipeline(require('./settings'), localUtils);
|
2018-10-11 18:09:01 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
get subscribers() {
|
|
|
|
return shared.pipeline(require('./subscribers'), localUtils);
|
2018-10-12 22:41:39 +02:00
|
|
|
},
|
|
|
|
|
2019-01-30 17:06:09 +05:30
|
|
|
get members() {
|
|
|
|
return shared.pipeline(require('./members'), localUtils);
|
|
|
|
},
|
|
|
|
|
2019-02-24 11:18:45 +07:00
|
|
|
get images() {
|
|
|
|
return shared.pipeline(require('./images'), localUtils);
|
2018-10-12 23:10:43 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
get tags() {
|
|
|
|
return shared.pipeline(require('./tags'), localUtils);
|
2018-10-12 23:27:30 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
get users() {
|
|
|
|
return shared.pipeline(require('./users'), localUtils);
|
2018-10-17 18:15:43 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
get preview() {
|
|
|
|
return shared.pipeline(require('./preview'), localUtils);
|
2018-11-02 14:02:26 +05:30
|
|
|
},
|
|
|
|
|
|
|
|
get oembed() {
|
|
|
|
return shared.pipeline(require('./oembed'), localUtils);
|
2018-11-07 03:50:43 +05:30
|
|
|
},
|
|
|
|
|
|
|
|
get slack() {
|
|
|
|
return shared.pipeline(require('./slack'), localUtils);
|
2018-11-07 15:29:37 +01:00
|
|
|
},
|
|
|
|
|
2019-02-24 18:37:11 +01:00
|
|
|
get config() {
|
|
|
|
return shared.pipeline(require('./config'), localUtils);
|
2019-01-03 15:23:22 +00:00
|
|
|
},
|
|
|
|
|
2019-01-30 14:14:27 +01:00
|
|
|
get themes() {
|
|
|
|
return shared.pipeline(require('./themes'), localUtils);
|
2019-01-29 19:52:05 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
get actions() {
|
|
|
|
return shared.pipeline(require('./actions'), localUtils);
|
2019-02-03 13:36:08 +01:00
|
|
|
},
|
|
|
|
|
2019-02-24 14:15:09 +01:00
|
|
|
get site() {
|
|
|
|
return shared.pipeline(require('./site'), localUtils);
|
|
|
|
},
|
|
|
|
|
2019-02-03 13:36:08 +01:00
|
|
|
get serializers() {
|
|
|
|
return require('./utils/serializers');
|
2019-02-25 19:52:45 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Content API Controllers
|
|
|
|
*
|
|
|
|
* @NOTE:
|
|
|
|
*
|
|
|
|
* Please create separate controllers for Content & Admin API. The goal is to expose `api.v2.content` and
|
|
|
|
* `api.v2.admin` soon. Need to figure out how serializers & validation works then.
|
|
|
|
*/
|
|
|
|
get pagesPublic() {
|
|
|
|
return shared.pipeline(require('./pages-public'), localUtils, 'content');
|
|
|
|
},
|
|
|
|
|
|
|
|
get tagsPublic() {
|
|
|
|
return shared.pipeline(require('./tags-public'), localUtils, 'content');
|
|
|
|
},
|
|
|
|
|
|
|
|
get publicSettings() {
|
|
|
|
return shared.pipeline(require('./settings-public'), localUtils, 'content');
|
|
|
|
},
|
|
|
|
|
|
|
|
get postsPublic() {
|
|
|
|
return shared.pipeline(require('./posts-public'), localUtils, 'content');
|
|
|
|
},
|
|
|
|
|
|
|
|
get authorsPublic() {
|
|
|
|
return shared.pipeline(require('./authors-public'), localUtils, 'content');
|
2018-10-03 20:45:42 +07:00
|
|
|
}
|
|
|
|
};
|