Files
SPT-Server-Build/Core/Routers/Dynamic/HttpDynamicRouter.cs
T
2025-01-10 13:49:28 +00:00

21 lines
534 B
C#

using Core.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())
]
)
{
}
}