Is bool again.

This commit is contained in:
2026-04-03 17:03:26 -04:00
parent cf70b82024
commit ebda006010

View File

@@ -28,10 +28,17 @@ 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) =>
{
var call = await rtcCallService.GetActiveCallAsync(channelId);
return call is null ? Results.NotFound() : Results.Ok(call); //TODO: needs to return a true or false value if the channelId is active
return Results.Ok(await rtcCallService.HasActiveCallAsync(channelId));
});
// TODO: You can uncomment me if you'd like to have both. Otherwise delete me - you never know but I made it "call" instead of "active"
// Return the active call object for the specified channel.
//app.MapGet("/api/rtc/call/{channelId}", async (string channelId, RtcCallService rtcCallService) =>
//{
// 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.
app.MapGet("/api/rtc/offers/{channelId}", async (string channelId, RtcCallService rtcCallService) =>
{