80f759a0da
* Add edge case for Reverse Proxies * Cleanup HttpListener, remove unecessary MemoryStreams * Handle with IPAddress instead of string * Handle nullabiity of RouteAction, tighten typing on requests * Cleanup HttpRouter * Use tighter typing on Routers
25 lines
917 B
C#
25 lines
917 B
C#
using SPTarkov.DI.Annotations;
|
|
using SPTarkov.Server.Core.Callbacks;
|
|
using SPTarkov.Server.Core.DI;
|
|
using SPTarkov.Server.Core.Models.Eft.Common;
|
|
using SPTarkov.Server.Core.Models.Eft.Common.Request;
|
|
using SPTarkov.Server.Core.Utils;
|
|
|
|
namespace SPTarkov.Server.Core.Routers.Static;
|
|
|
|
[Injectable]
|
|
public class NotifierStaticRouter(JsonUtil jsonUtil, NotifierCallbacks notifierCallbacks)
|
|
: StaticRouter(
|
|
jsonUtil,
|
|
[
|
|
new RouteAction<EmptyRequestData>(
|
|
"/client/notifier/channel/create",
|
|
async (url, info, sessionID, output) => await notifierCallbacks.CreateNotifierChannel(url, info, sessionID)
|
|
),
|
|
new RouteAction<UIDRequestData>(
|
|
"/client/game/profile/select",
|
|
async (url, info, sessionID, output) => await notifierCallbacks.SelectProfile(url, info, sessionID)
|
|
),
|
|
]
|
|
) { }
|