diff --git a/RelayServer/Endpoints/RtcEndpoints.cs b/RelayServer/Endpoints/RtcEndpoints.cs index d567e42..602e6d3 100644 --- a/RelayServer/Endpoints/RtcEndpoints.cs +++ b/RelayServer/Endpoints/RtcEndpoints.cs @@ -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)); diff --git a/RelayServer/Services/Rtc/RtcCallService.cs b/RelayServer/Services/Rtc/RtcCallService.cs index dec82ac..b0ca22b 100644 --- a/RelayServer/Services/Rtc/RtcCallService.cs +++ b/RelayServer/Services/Rtc/RtcCallService.cs @@ -37,6 +37,7 @@ public sealed class RtcCallService /// public async Task JoinCallAsync(string channelId, string username) { + //TODO: move active call creation logic to WriteOfferAsync Function var activeCalls = await _db.Select("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("rtc_offers"); - var offer = offers + var offer = offers //TODO: Remove offer creation in C# .Where(x => x.ChannelId == channelId) .OrderByDescending(x => x.CreatedAt) .FirstOrDefault();