Is bool again.
This commit is contained in:
@@ -28,10 +28,17 @@ public static class RtcEndpoints
|
|||||||
// Return whether the specified channel currently has an active call.
|
// Return whether the specified channel currently has an active call.
|
||||||
app.MapGet("/api/rtc/active/{channelId}", async (string channelId, RtcCallService rtcCallService) =>
|
app.MapGet("/api/rtc/active/{channelId}", async (string channelId, RtcCallService rtcCallService) =>
|
||||||
{
|
{
|
||||||
var call = await rtcCallService.GetActiveCallAsync(channelId);
|
return Results.Ok(await rtcCallService.HasActiveCallAsync(channelId));
|
||||||
return call is null ? Results.NotFound() : Results.Ok(call); //TODO: needs to return a true or false value if the channelId is active
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 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.
|
// Return the latest stored SDP offer for the specified channel.
|
||||||
app.MapGet("/api/rtc/offers/{channelId}", async (string channelId, RtcCallService rtcCallService) =>
|
app.MapGet("/api/rtc/offers/{channelId}", async (string channelId, RtcCallService rtcCallService) =>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user