mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 12:06:35 +08:00
feat: backend module awareness & optional request (#5909)
This commit is contained in:
@@ -46,6 +46,7 @@ export class ServerConfigType {
|
||||
@Field(() => [ServerFeature], { description: 'enabled server features' })
|
||||
features!: ServerFeature[];
|
||||
}
|
||||
|
||||
export class ServerConfigResolver {
|
||||
@Query(() => ServerConfigType, {
|
||||
description: 'server config',
|
||||
|
||||
@@ -17,11 +17,10 @@ import { StripeWebhook } from './webhook';
|
||||
UserSubscriptionResolver,
|
||||
],
|
||||
controllers: [StripeWebhook],
|
||||
// TODO(@forehalo): enable this requirements when conditional query is implemented in frontend
|
||||
// requires: [
|
||||
// 'plugins.payment.stripe.keys.APIKey',
|
||||
// 'plugins.payment.stripe.keys.webhookKey',
|
||||
// ],
|
||||
requires: [
|
||||
'plugins.payment.stripe.keys.APIKey',
|
||||
'plugins.payment.stripe.keys.webhookKey',
|
||||
],
|
||||
contributesTo: ServerFeature.Payment,
|
||||
if: config => config.flavor.graphql,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user