Update: Edited to change JSON formatting.
This commit is contained in:
@@ -28,7 +28,8 @@ public static class RtcEndpoints
|
||||
// Return whether the specified channel currently has an active call.
|
||||
app.MapGet("/api/rtc/active/{channelId}", async (string channelId, RtcCallService rtcCallService) =>
|
||||
{
|
||||
return Results.Ok(await rtcCallService.HasActiveCallAsync(channelId));
|
||||
var call = await rtcCallService.GetActiveCallAsync(channelId);
|
||||
return call is null ? Results.NotFound() : Results.Ok(call);
|
||||
});
|
||||
|
||||
// Return the latest stored SDP offer for the specified channel.
|
||||
|
||||
Reference in New Issue
Block a user