mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
Added media inliner service scaffolding
refs https://github.com/TryGhost/Toolbox/issues/524 - This is groundwork to build up on when adding media inlining functionality. This service will be used by the API to trigger post's content processing and media inlining.
This commit is contained in:
parent
a479b719ea
commit
da78e235dd
2 changed files with 19 additions and 1 deletions
|
@ -310,6 +310,7 @@ async function initServices({config}) {
|
|||
const tagsPublic = require('./server/services/tags-public');
|
||||
const postsPublic = require('./server/services/posts-public');
|
||||
const slackNotifications = require('./server/services/slack-notifications');
|
||||
const mediaInliner = require('./server/services/media-inliner');
|
||||
|
||||
const urlUtils = require('./shared/url-utils');
|
||||
|
||||
|
@ -346,7 +347,8 @@ async function initServices({config}) {
|
|||
comments.init(),
|
||||
linkTracking.init(),
|
||||
emailSuppressionList.init(),
|
||||
slackNotifications.init()
|
||||
slackNotifications.init(),
|
||||
mediaInliner.init()
|
||||
]);
|
||||
debug('End: Services');
|
||||
|
||||
|
|
16
ghost/core/core/server/services/media-inliner/service.js
Normal file
16
ghost/core/core/server/services/media-inliner/service.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
module.exports = {
|
||||
async init() {
|
||||
const debug = require('@tryghost/debug')('mediaInliner');
|
||||
|
||||
this.api = {
|
||||
// @NOTE: the inlining should become an offloaded job
|
||||
// startMediaInliner: mediaInliner.inlineMedia
|
||||
startMediaInliner: () => {
|
||||
debug('[Inliner] Starting media inlining job');
|
||||
return {
|
||||
status: 'success'
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
Loading…
Add table
Reference in a new issue