Ghost/core/server/lib/url-utils/index.js
Kevin Ansfield fa4e68ba13 Added transformer methods to mobiledoc cards
no issue

- adds abolsute->relative and relative->absolute transformer methods to card definitions
- allows for each card to tailor it's transformation to the specific needs of it's payload so that the `mobiledoc` field can be transformed successfully during API serialization/deserialization
2019-10-07 22:59:19 +01:00

16 lines
471 B
JavaScript

const UrlUtils = require('@tryghost/url-utils');
const config = require('../../config');
const cards = require('../mobiledoc/cards');
const urlUtils = new UrlUtils({
url: config.get('url'),
adminUrl: config.get('admin:url'),
apiVersions: config.get('api:versions'),
slugs: config.get('slugs').protected,
redirectCacheMaxAge: config.get('caching:301:maxAge'),
baseApiPath: '/ghost/api',
cardTransformers: cards
});
module.exports = urlUtils;