Ghost/core/server/api/canary/site.js
Rish adde1fa01c Fixed allowSelfSignup value in site data
refs https://github.com/TryGhost/members.js/issues/6

Fixed a bug in setting `allowSelfSignup` value as public plans
2020-04-21 23:35:16 +05:30

27 lines
852 B
JavaScript

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