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!

Updated DTO of adding subscriber

Yevhenii Kulisidi08d88962edb7
diff --git a/src/project/dto/add-subscriber.dto.ts b/src/project/dto/add-subscriber.dto.ts
index f98405485..b17aca09b 100644
--- a/src/project/dto/add-subscriber.dto.ts
+++ b/src/project/dto/add-subscriber.dto.ts
@@ -1,8 +1,13 @@
-import { Matches, IsEmail } from 'class-validator'
+import { Matches, IsEmail, IsNotEmpty, IsEnum } from 'class-validator'
+import { ReportFrequency } from '../enums'
export class AddSubscriberParamsDto {
@Matches(/^(?!.*--)[a-zA-Z0-9-]{12}$/)
readonly projectId: string
+
+ @IsNotEmpty()
+ @IsEnum(ReportFrequency)
+ readonly reportFrequency: ReportFrequency
}
export class AddSubscriberBodyDto {