update websocket
This commit is contained in:
@@ -43,8 +43,10 @@ export class ClerkAuthGuard implements CanActivate {
|
||||
request.user = session.user
|
||||
|
||||
return true
|
||||
} catch (error: any) {
|
||||
throw new UnauthorizedException(error.message)
|
||||
} catch (error: unknown) {
|
||||
throw new UnauthorizedException(
|
||||
error instanceof Error ? error.message : 'Unknown error',
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ export class ClerkController {
|
||||
@Post('webhook')
|
||||
@ApiOperation({ summary: 'Clerk Webhook' })
|
||||
@ApiResponse({ status: 200, description: 'Webhook created successfully' })
|
||||
webhook(@Headers() headers: any, @Body() body: any) {
|
||||
webhook(@Headers() headers: Headers, @Body() body: any) {
|
||||
return this.clerkService.webhook(body)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,7 @@ import { Injectable, Logger } from '@nestjs/common'
|
||||
import { PrismaService } from '../Prisma/prisma.service'
|
||||
import { clerkClient } from '@clerk/express'
|
||||
|
||||
export interface ClerkResponse {
|
||||
|
||||
}
|
||||
export interface ClerkResponse {}
|
||||
@Injectable()
|
||||
export class ClerkService {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
Reference in New Issue
Block a user