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) => {