1af50bfd34
* Changed application to use background services and removed hacky http server startup * Small improvements and method removals * Removed Core dependency on Web application SDK * Fixed wrong imported type --------- Co-authored-by: Alex <clodanSPT@hotmail.com> Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
21 lines
540 B
C#
21 lines
540 B
C#
using Microsoft.AspNetCore.Http;
|
|
using SPTarkov.DI.Annotations;
|
|
using SPTarkov.Server.Core.DI;
|
|
using SPTarkov.Server.Core.Models.Common;
|
|
|
|
namespace SPTarkov.Server.Core.Routers.Serializers;
|
|
|
|
[Injectable]
|
|
public class ImageSerializer(ImageRouter imageRouter) : ISerializer
|
|
{
|
|
public async Task Serialize(MongoId sessionID, HttpRequest req, HttpResponse resp, object? body)
|
|
{
|
|
await imageRouter.SendImage(sessionID, req, resp, body);
|
|
}
|
|
|
|
public bool CanHandle(string route)
|
|
{
|
|
return route == "IMAGE";
|
|
}
|
|
}
|