mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-15 03:01:37 -05:00
Bumped serializer to later in boot (#18181)
no refs - import was too early in boot process, causing db init to fail
This commit is contained in:
parent
077bd2c883
commit
37a9ffc63e
1 changed files with 4 additions and 1 deletions
|
@ -3,12 +3,12 @@ const errors = require('@tryghost/errors');
|
|||
const urlUtils = require('../../shared/url-utils');
|
||||
const config = require('../../shared/config');
|
||||
const storage = require('../adapters/storage');
|
||||
const serializePosts = require('../api/endpoints/utils/serializers/output/posts').all;
|
||||
|
||||
let nodes;
|
||||
let lexicalHtmlRenderer;
|
||||
let urlTransformMap;
|
||||
let postsService;
|
||||
let serializePosts;
|
||||
|
||||
function populateNodes() {
|
||||
const {DEFAULT_NODES} = require('@tryghost/kg-default-nodes');
|
||||
|
@ -34,6 +34,9 @@ module.exports = {
|
|||
const getPostServiceInstance = require('../services/posts/posts-service');
|
||||
postsService = getPostServiceInstance();
|
||||
}
|
||||
if (!serializePosts) {
|
||||
serializePosts = require('../api/endpoints/utils/serializers/output/posts').all;
|
||||
}
|
||||
|
||||
const getCollectionPosts = async (collectionSlug, postCount) => {
|
||||
const frame = {
|
||||
|
|
Loading…
Add table
Reference in a new issue