* configurable trial days

* hide create sso provider in cloud
This commit is contained in:
Philipinho
2025-03-06 21:06:24 +00:00
parent d925c95fc9
commit 3b4e414c97
4 changed files with 24 additions and 14 deletions

View File

@ -104,7 +104,10 @@ export class WorkspaceService {
hostname = await this.generateHostname(
createWorkspaceDto.hostname ?? createWorkspaceDto.name,
);
trialEndAt = addDays(new Date(), 14);
trialEndAt = addDays(
new Date(),
this.environmentService.getBillingTrialDays(),
);
status = WorkspaceStatus.Active;
plan = 'standard';
}

View File

@ -45,10 +45,7 @@ export class EnvironmentService {
}
getDatabaseMaxPool(): number {
return parseInt(
this.configService.get<string>('DATABASE_MAX_POOL', '10'),
10,
);
return parseInt(this.configService.get<string>('DATABASE_MAX_POOL', '10'));
}
getRedisUrl(): string {
@ -171,8 +168,8 @@ export class EnvironmentService {
return this.configService.get<string>('STRIPE_WEBHOOK_SECRET');
}
getEnterpriseKey(): string {
return this.configService.get<string>('ENTERPRISE_KEY');
getBillingTrialDays(): number {
return parseInt(this.configService.get<string>('BILLING_TRIAL_DAYS', '14'));
}
getCollabUrl(): string {