updated RtcOffer to reflect proper communication needs and added todo

This commit is contained in:
2026-04-03 16:24:13 -04:00
parent f24a255d12
commit cf70b82024
3 changed files with 11 additions and 8 deletions

View File

@@ -15,7 +15,7 @@ public static class RtcEndpoints
// Store or update the current SDP offer for a channel call.
app.MapPost("/api/rtc/offer", async (RtcOffer request, RtcCallService rtcCallService) =>
{
await rtcCallService.WriteOfferAsync(request.ChannelId, request.Username, request.Sdp);
await rtcCallService.WriteOfferAsync(request.ChannelId, request.Username, request.SessionDescription);
return Results.Ok();
});
@@ -29,7 +29,7 @@ public static class RtcEndpoints
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);
return call is null ? Results.NotFound() : Results.Ok(call); //TODO: needs to return a true or false value if the channelId is active
});
// Return the latest stored SDP offer for the specified channel.