Skip to content

Commit

Permalink
log
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Arregui committed Mar 19, 2024
1 parent 6764d32 commit d474688
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/controllers/handlers/comms-scene-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ import { HandlerContextWithPath, NotFoundError, UnauthorizedError, Permissions }
import { validate } from './utils'

export async function commsSceneHandler(
context: HandlerContextWithPath<'fetch' | 'config' | 'livekit' | 'sceneFetcher', '/get-scene-adapter'>
context: HandlerContextWithPath<'fetch' | 'config' | 'livekit' | 'sceneFetcher' | 'logs', '/get-scene-adapter'>
): Promise<IHttpServerComponent.IResponse> {
const {
components: { livekit, sceneFetcher }
components: { livekit, sceneFetcher, logs }
} = context

const logger = logs.getLogger('comms-scene-handler')
const { realmName, sceneId, identity } = await validate(context)
let forPreview = false
let room: string
Expand Down Expand Up @@ -38,6 +39,7 @@ export async function commsSceneHandler(
}

const credentials = await livekit.generateCredentials(identity, room, permissions, forPreview)
logger.debug(`Token generated for ${identity} to join room ${room}`)

return {
status: 200,
Expand Down

0 comments on commit d474688

Please sign in to comment.