From ebda0060100734fe12ad93eaab48641257c9d8b6 Mon Sep 17 00:00:00 2001 From: RuKira Date: Fri, 3 Apr 2026 17:03:26 -0400 Subject: [PATCH] Is bool again. --- RelayServer/Endpoints/RtcEndpoints.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/RelayServer/Endpoints/RtcEndpoints.cs b/RelayServer/Endpoints/RtcEndpoints.cs index aa21efe..35446ce 100644 --- a/RelayServer/Endpoints/RtcEndpoints.cs +++ b/RelayServer/Endpoints/RtcEndpoints.cs @@ -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) => {