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!

fixed login

Blue Mouse5fed9ef1cdcd
diff --git a/apps/selfhosted/src/auth/dtos/login.dto.ts b/apps/selfhosted/src/auth/dtos/login.dto.ts
index 22c75ef73..48ce61915 100644
--- a/apps/selfhosted/src/auth/dtos/login.dto.ts
+++ b/apps/selfhosted/src/auth/dtos/login.dto.ts
@@ -1,8 +1,26 @@
import { ApiProperty } from '@nestjs/swagger'
+import {
+ IsEmail,
+ MinLength,
+} from 'class-validator'
export class LoginRequestDto {
- email: string
- password: string
+ @ApiProperty({
+ description: 'User email',
+ example: '[email protected]',
+ maxLength: 254,
+ minLength: 6,
+ })
+ @IsEmail({}, { message: 'Please enter the valid email.' })
+ public readonly email: string
+
+ @ApiProperty({
+ description: 'User password',
+ example: '%d7*c4W45p',
+ minLength: 8,
+ })
+ @MinLength(8, { message: 'Min length is $constraint1 characters' })
+ public readonly password: string
}
export class LoginResponseDto {