more TODOs
This commit is contained in:
@@ -13,6 +13,7 @@ public static class RtcEndpoints
|
||||
public static void MapRtcEndpoints(this WebApplication app)
|
||||
{
|
||||
// Join a channel call and determine whether the caller should become the offerer.
|
||||
//TODO: Remove join endpoint and redo its logic in correct locations
|
||||
app.MapPost("/api/rtc/join", async (RtcJoinRequest request, RtcCallService rtcCallService) =>
|
||||
{
|
||||
return Results.Ok(await rtcCallService.JoinCallAsync(request.ChannelId, request.Username));
|
||||
|
||||
@@ -37,6 +37,7 @@ public sealed class RtcCallService
|
||||
/// </returns>
|
||||
public async Task<RtcJoinResponse> JoinCallAsync(string channelId, string username)
|
||||
{
|
||||
//TODO: move active call creation logic to WriteOfferAsync Function
|
||||
var activeCalls = await _db.Select<RtcActiveCall>("rtc_active_calls");
|
||||
var activeCall = activeCalls.FirstOrDefault(x => x.ChannelId == channelId && x.IsActive);
|
||||
|
||||
@@ -62,7 +63,7 @@ public sealed class RtcCallService
|
||||
}
|
||||
|
||||
var offers = await _db.Select<RtcOffer>("rtc_offers");
|
||||
var offer = offers
|
||||
var offer = offers //TODO: Remove offer creation in C#
|
||||
.Where(x => x.ChannelId == channelId)
|
||||
.OrderByDescending(x => x.CreatedAt)
|
||||
.FirstOrDefault();
|
||||
|
||||
Reference in New Issue
Block a user