Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Allow unlimited goals per project

Blue Mouse3f0e930cc6a1
diff --git a/backend/apps/community/src/goal/goal.controller.ts b/backend/apps/community/src/goal/goal.controller.ts
index 6308e5b5a..f191ade63 100644
--- a/backend/apps/community/src/goal/goal.controller.ts
+++ b/backend/apps/community/src/goal/goal.controller.ts
@@ -42,8 +42,6 @@ import { CreateGoalDto, UpdateGoalDto } from './dto/goal.dto'
import { GoalService } from './goal.service'
import { clickhouse } from '../common/integrations/clickhouse'
-const GOALS_MAXIMUM = 50 // Maximum goals per project
-
const timeBucketConversion: Record<string, string> = Object.assign(
Object.create(null),
{
@@ -212,14 +210,6 @@ export class GoalController {
'You are not allowed to add goals to this project',
)
- const goalsCount = await this.goalService.count(goalDto.pid)
-
- if (goalsCount >= GOALS_MAXIMUM) {
- throw new BadRequestException(
- `You cannot create more than ${GOALS_MAXIMUM} goals per project.`,
- )
- }
-
try {
const newGoal = await this.goalService.create({
name: goalDto.name,