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!

some updates

Blue Mousefc14f24a2c11
diff --git a/src/alert/alert.controller.ts b/src/alert/alert.controller.ts
index 1cae59bd2..5f973f679 100644
--- a/src/alert/alert.controller.ts
+++ b/src/alert/alert.controller.ts
@@ -52,7 +52,7 @@ export class AlertController {
const pids = _map(projects, (project) => project.id)
- return this.alertService.paginate({ take, skip }, { project: In(pids) })
+ return this.alertService.paginate({ take, skip }, { project: In(pids) }, ['project', 'project.id'])
}
@Post('/')
diff --git a/src/alert/dto/alert.dto.ts b/src/alert/dto/alert.dto.ts
index b0e4b6ef1..9be3d8388 100644
--- a/src/alert/dto/alert.dto.ts
+++ b/src/alert/dto/alert.dto.ts
@@ -55,18 +55,22 @@ export class CreateAlertDTO {
name: string
@ApiProperty()
- @IsOptional()
- queryMetric?: QueryMetric
+ @IsNotEmpty()
+ queryMetric: QueryMetric
@ApiProperty()
- @IsOptional()
- queryCondition?: QueryCondition
+ @IsNotEmpty()
+ queryCondition: QueryCondition
@ApiProperty()
- @IsOptional()
- queryValue?: number
+ @IsNotEmpty()
+ queryValue: number
@ApiProperty()
- @IsOptional()
- queryTime?: QueryTime
+ @IsNotEmpty()
+ queryTime: QueryTime
+
+ @ApiProperty()
+ @IsNotEmpty()
+ active: boolean
}