Ghost/core/server/api/canary/site.js
Rish 7b761a8751 💡 Added canary api endpoint
no issue

Adds new canary api endpoint, currently replicating v2 endpoint but paving way for future updates to new version
2019-08-09 20:46:49 +05:30

21 lines
491 B
JavaScript

const ghostVersion = require('../../lib/ghost-version');
const settingsCache = require('../../services/settings/cache');
const urlUtils = require('../../lib/url-utils');
const site = {
docName: 'site',
read: {
permissions: false,
query() {
return {
title: settingsCache.get('title'),
url: urlUtils.urlFor('home', true),
version: ghostVersion.safe
};
}
}
};
module.exports = site;