mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Updated canary admin/site endpoint again
- put brand back, but only if dev experiments is enabled - put members plans and allowSelfSignup back, but this is temporary as they need to live elsewhere
This commit is contained in:
parent
323117fe23
commit
4e9889ea4f
1 changed files with 15 additions and 6 deletions
|
@ -1,7 +1,8 @@
|
|||
const ghostVersion = require('../../lib/ghost-version');
|
||||
const settingsCache = require('../../services/settings/cache');
|
||||
const urlUtils = require('../../lib/url-utils');
|
||||
// const membersService = require('../../services/members');
|
||||
const config = require('../../config');
|
||||
const membersService = require('../../services/members');
|
||||
|
||||
const site = {
|
||||
docName: 'site',
|
||||
|
@ -9,16 +10,24 @@ const site = {
|
|||
read: {
|
||||
permissions: false,
|
||||
query() {
|
||||
return {
|
||||
const response = {
|
||||
title: settingsCache.get('title'),
|
||||
description: settingsCache.get('description'),
|
||||
logo: settingsCache.get('logo'),
|
||||
// brand: settingsCache.get('brand'), // this is a dev experiments feature & needs to be behind the flag
|
||||
brand: settingsCache.get('brand'),
|
||||
url: urlUtils.urlFor('home', true),
|
||||
// plans: membersService.config.getPublicPlans(), // these are new members features that probably won't live here
|
||||
// allowSelfSignup: membersService.config.getAllowSelfSignup(), // these are new members features that probably won't live here
|
||||
version: ghostVersion.safe
|
||||
version: ghostVersion.safe,
|
||||
// @TODO: move these to a members API
|
||||
plans: membersService.config.getPublicPlans(), // these are new members features that probably won't live here
|
||||
allowSelfSignup: membersService.config.getAllowSelfSignup() // these are new members features that probably won't live here
|
||||
};
|
||||
|
||||
// Brand is currently an experimental feature
|
||||
if (!config.get('enableDeveloperExperiments')) {
|
||||
delete response.brand;
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue