Skip to content

Commit 88bcc85

Browse files
chore(api-service): exclude demo workflows from limit validation
1 parent ff86215 commit 88bcc85

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

libs/application-generic/src/services/resource-validator.service.ts

+9
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ import { NotificationStep } from '../usecases';
1212
import { FeatureFlagsService } from './feature-flags';
1313

1414
export const DAY_IN_MS = 24 * 60 * 60 * 1000;
15+
const DEMO_WORKFLOWS_IDENTIFIER = [
16+
'demo-apartment-review',
17+
'a-new-member-joining-the-team',
18+
'demo-verify-otp',
19+
'demo-password-reset',
20+
'demo-recent-login',
21+
'demo-comment-on-task',
22+
];
1523

1624
/* The absolute maximum values allowed by the system */
1725
export const SYSTEM_LIMITS = {
@@ -62,6 +70,7 @@ export class ResourceValidatorService {
6270
async validateWorkflowLimit(environmentId: string): Promise<void> {
6371
const workflowsCount = await this.notificationTemplateRepository.count({
6472
_environmentId: environmentId,
73+
'triggers.identifier': { $nin: DEMO_WORKFLOWS_IDENTIFIER },
6574
});
6675

6776
if (workflowsCount < MIN_VALIDATION_LIMITS.WORKFLOWS) {

0 commit comments

Comments
 (0)