Files
SPT-Server-Build/Core/Routers/Static/ItemEventStaticRouter.cs
T
CWX bb887b0901 Lots of new things (#40)
* callbacks

* controllers

* Router override

* make requests use interface

* create Routers

* extra parts
2025-01-12 15:35:32 +00:00

35 lines
911 B
C#

using Core.Annotations;
using Core.Callbacks;
using Core.DI;
using Core.Models.Eft.ItemEvent;
using Core.Utils;
namespace Core.Routers.Static;
[Injectable(InjectableTypeOverride = typeof(StaticRouter))]
public class ItemEventStaticRouter : StaticRouter
{
protected static ItemEventCallbacks _itemEventCallbacks;
public ItemEventStaticRouter(
JsonUtil jsonUtil,
ItemEventCallbacks itemEventCallbacks
) : base(
jsonUtil,
[
new RouteAction(
"/client/game/profile/items/moving",
(
url,
info,
sessionID,
output
) => _itemEventCallbacks.HandleEvents(url, info as ItemEventRouterRequest, sessionID),
typeof(ItemEventRouterRequest))
]
)
{
_itemEventCallbacks = itemEventCallbacks;
}
}