mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03: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
@ -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…
Reference in New Issue
Block a user