Files
SPT-Server-Build/Libraries/Core/Routers/Dynamic/HttpDynamicRouter.cs
T
2025-02-07 19:36:17 +00:00

21 lines
575 B
C#

using Core.DI;
using Core.Utils;
using SptCommon.Annotations;
namespace Core.Routers.Dynamic;
[Injectable(InjectableTypeOverride = typeof(DynamicRouter))]
public class HttpDynamicRouter : DynamicRouter
{
public HttpDynamicRouter(ImageRouter imageRouter, JsonUtil jsonUtil) : base(
jsonUtil,
[
new RouteAction(".jpg", (_, _, _, _) => imageRouter.GetImage()),
new RouteAction(".png", (_, _, _, _) => imageRouter.GetImage()),
new RouteAction(".ico", (_, _, _, _) => imageRouter.GetImage())
]
)
{
}
}