Files
SPT-Server-Build/Libraries/Core/Routers/Dynamic/HttpDynamicRouter.cs
T
2025-01-19 17:45:48 +00:00

21 lines
539 B
C#

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