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!

rm regex for pid

Blue Mouse98da388f2072
diff --git a/src/captcha/dtos/automatic.dto.ts b/src/captcha/dtos/automatic.dto.ts
index 95bc87820..d9a2a3532 100644
--- a/src/captcha/dtos/automatic.dto.ts
+++ b/src/captcha/dtos/automatic.dto.ts
@@ -1,7 +1,5 @@
import { ApiProperty } from '@nestjs/swagger'
-import { IsNotEmpty, Matches } from 'class-validator'
-
-import { PID_REGEX } from '../../common/constants'
+import { IsNotEmpty, IsString } from 'class-validator'
export class AutomaticDTO {
@ApiProperty({
@@ -10,6 +8,6 @@ export class AutomaticDTO {
description: 'A unique project ID',
})
@IsNotEmpty()
- @Matches(PID_REGEX)
+ @IsString()
pid: string
}
diff --git a/src/captcha/dtos/generate.dto.ts b/src/captcha/dtos/generate.dto.ts
index a64ef83bb..18c74e3ae 100644
--- a/src/captcha/dtos/generate.dto.ts
+++ b/src/captcha/dtos/generate.dto.ts
@@ -1,7 +1,5 @@
import { ApiProperty } from '@nestjs/swagger'
-import { IsOptional, IsNotEmpty, Matches } from 'class-validator'
-
-import { PID_REGEX } from '../../common/constants'
+import { IsOptional, IsNotEmpty, IsString } from 'class-validator'
export const DEFAULT_THEME = 'light'
@@ -12,7 +10,7 @@ export class GenerateDTO {
description: 'A unique project ID',
})
@IsNotEmpty()
- @Matches(PID_REGEX)
+ @IsString()
pid: string
@ApiProperty({
diff --git a/src/captcha/dtos/manual.dto.ts b/src/captcha/dtos/manual.dto.ts
index b3be84e84..f3b19b8dc 100644
--- a/src/captcha/dtos/manual.dto.ts
+++ b/src/captcha/dtos/manual.dto.ts
@@ -1,7 +1,5 @@
import { ApiProperty } from '@nestjs/swagger'
-import { IsNotEmpty, IsString, Matches } from 'class-validator'
-
-import { PID_REGEX } from '../../common/constants'
+import { IsNotEmpty, IsString } from 'class-validator'
export class ManualDTO {
@ApiProperty({
@@ -10,7 +8,7 @@ export class ManualDTO {
description: 'A unique project ID',
})
@IsNotEmpty()
- @Matches(PID_REGEX)
+ @IsString()
pid: string
@ApiProperty({