diff --git a/core/server/adapters/scheduling/post-scheduling/index.js b/core/server/adapters/scheduling/post-scheduling/index.js index 15ba3db0b6..491152bf0d 100644 --- a/core/server/adapters/scheduling/post-scheduling/index.js +++ b/core/server/adapters/scheduling/post-scheduling/index.js @@ -3,7 +3,6 @@ const Promise = require('bluebird'), localUtils = require('../utils'), common = require('../../../lib/common'), models = require('../../../models'), - schedules = require('../../../api/schedules'), urlService = require('../../../services/url'), _private = {}; @@ -25,7 +24,8 @@ _private.loadClient = function loadClient() { }; _private.loadScheduledPosts = function () { - return schedules.getScheduledPosts() + const api = require('../../../api'); + return api.schedules.getScheduledPosts() .then((result) => { return result.posts || []; }); diff --git a/core/server/api/schedules.js b/core/server/api/schedules.js index 849b1c2493..4db821f910 100644 --- a/core/server/api/schedules.js +++ b/core/server/api/schedules.js @@ -6,7 +6,7 @@ const Promise = require('bluebird'), models = require('../models'), config = require('../config'), common = require('../lib/common'), - postsAPI = require('../api/posts'); + postsAPI = require('./posts'); /** * Publish a scheduled post