From ed6450244df3ea171865be7ff958e448748b3f89 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Wed, 3 Oct 2018 12:39:03 +0900 Subject: [PATCH] Feature flags feature (#2803) --- src/server/api/endpoints/meta.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/server/api/endpoints/meta.ts b/src/server/api/endpoints/meta.ts index 6c585d2c3..9baf3c252 100644 --- a/src/server/api/endpoints/meta.ts +++ b/src/server/api/endpoints/meta.ts @@ -39,6 +39,15 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) => recaptchaSitekey: config.recaptcha ? config.recaptcha.site_key : null, swPublickey: config.sw ? config.sw.public_key : null, hidedTags: (me && me.isAdmin) ? meta.hidedTags : undefined, - bannerUrl: meta.bannerUrl + bannerUrl: meta.bannerUrl, + features: { + registration: !meta.disableRegistration, + localTimeLine: !meta.disableLocalTimeline, + elasticsearch: config.elasticsearch ? true : false, + recaptcha: config.recaptcha ? true : false, + objectStorage: config.drive && config.drive.storage === 'minio', + twitter: config.twitter ? true : false, + serviceWorker: config.sw ? true : false + } }); });