feat: optional payment for server (#5055)

This commit is contained in:
DarkSky
2023-11-25 22:59:47 +08:00
committed by GitHub
parent 9dc2d55a5a
commit 13e712158c
6 changed files with 92 additions and 5 deletions
+15 -5
View File
@@ -3,7 +3,7 @@ import { EventEmitterModule } from '@nestjs/event-emitter';
import { ScheduleModule } from '@nestjs/schedule';
import { GqlModule } from '../graphql.module';
import { AuthModule } from './auth';
import { ServerConfigModule } from './config';
import { DocModule } from './doc';
import { PaymentModule } from './payment';
import { SyncModule } from './sync';
@@ -22,13 +22,23 @@ switch (SERVER_FLAVOR) {
case 'sync':
BusinessModules.push(SyncModule, DocModule.forSync());
break;
case 'graphql':
case 'selfhosted':
BusinessModules.push(
ServerConfigModule,
ScheduleModule.forRoot(),
GqlModule,
WorkspaceModule,
UsersModule,
DocModule.forRoot()
);
break;
case 'graphql':
BusinessModules.push(
ServerConfigModule,
ScheduleModule.forRoot(),
GqlModule,
WorkspaceModule,
UsersModule,
AuthModule,
DocModule.forRoot(),
PaymentModule
);
@@ -36,11 +46,11 @@ switch (SERVER_FLAVOR) {
case 'allinone':
default:
BusinessModules.push(
ServerConfigModule,
ScheduleModule.forRoot(),
GqlModule,
WorkspaceModule,
UsersModule,
AuthModule,
SyncModule,
DocModule.forRoot(),
PaymentModule
@@ -48,4 +58,4 @@ switch (SERVER_FLAVOR) {
break;
}
export { BusinessModules };
export { BusinessModules, SERVER_FLAVOR };