dotnet: fix token parameters types with ToString()

This commit is contained in:
pabloFuente 2024-12-13 15:17:27 +01:00
parent cecc89238d
commit 5e2a891250

View File

@ -51,9 +51,9 @@ app.MapPost(
) )
{ {
var token = new AccessToken(LIVEKIT_API_KEY, LIVEKIT_API_SECRET) var token = new AccessToken(LIVEKIT_API_KEY, LIVEKIT_API_SECRET)
.WithIdentity(participantName) .WithIdentity(participantName.ToString())
.WithName(participantName) .WithName(participantName.ToString())
.WithGrants(new VideoGrants { RoomJoin = true, Room = roomName }); .WithGrants(new VideoGrants { RoomJoin = true, Room = roomName.ToString() });
var jwt = token.ToJwt(); var jwt = token.ToJwt();
return Results.Json(new { token = jwt }); return Results.Json(new { token = jwt });