Update: Edited to change JSON formatting.

This commit is contained in:
2026-04-03 15:22:53 -04:00
parent 776889932e
commit f24a255d12
4 changed files with 69 additions and 56 deletions

View File

@@ -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.