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 selfhosted crashes

Blue Mouse12244fb4ef80
diff --git a/apps/selfhosted/src/auth/dtos/login.dto.ts b/apps/selfhosted/src/auth/dtos/login.dto.ts
index 62ed65270..22c75ef73 100644
--- a/apps/selfhosted/src/auth/dtos/login.dto.ts
+++ b/apps/selfhosted/src/auth/dtos/login.dto.ts
@@ -1,9 +1,9 @@
-import { ApiProperty, OmitType } from '@nestjs/swagger'
-import { RegisterRequestDto } from './register.dto'
+import { ApiProperty } from '@nestjs/swagger'
-export class LoginRequestDto extends OmitType(RegisterRequestDto, [
- 'checkIfLeaked',
-] as const) {}
+export class LoginRequestDto {
+ email: string
+ password: string
+}
export class LoginResponseDto {
@ApiProperty({
diff --git a/apps/selfhosted/src/auth/guards/index.ts b/apps/selfhosted/src/auth/guards/index.ts
index 56b62f819..aa5cbf455 100644
--- a/apps/selfhosted/src/auth/guards/index.ts
+++ b/apps/selfhosted/src/auth/guards/index.ts
@@ -2,5 +2,4 @@ export * from './jwt-access-token.guard'
export * from './jwt-refresh-token.guard'
export * from './roles.guard'
export * from './optional-jwt-access-token.guard'
-export * from './api-key.guard'
export * from './multi-auth.guard'
diff --git a/apps/selfhosted/src/auth/guards/jwt-access-token.guard.ts b/apps/selfhosted/src/auth/guards/jwt-access-token.guard.ts
index acf11ae8b..da772da93 100644
--- a/apps/selfhosted/src/auth/guards/jwt-access-token.guard.ts
+++ b/apps/selfhosted/src/auth/guards/jwt-access-token.guard.ts
@@ -1,6 +1,7 @@
import { Injectable, ExecutionContext } from '@nestjs/common'
import { Reflector } from '@nestjs/core'
import { AuthGuard } from '@nestjs/passport'
+import { Observable } from 'rxjs'
import { IS_PUBLIC_KEY } from '../decorators'
@Injectable()
@@ -9,7 +10,7 @@ export class JwtAccessTokenGuard extends AuthGuard('jwt-access-token') {
super()
}
- canActivate(context: ExecutionContext) {
+ canActivate(context: ExecutionContext): boolean | Promise<boolean> | Observable<boolean> {
const isPublic = this.reflector.getAllAndOverride<boolean>(IS_PUBLIC_KEY, [
context.getHandler(),
context.getClass(),