This commit is contained in:
Bahru 2025-07-31 23:56:15 +07:00
parent 49b6f3810d
commit 52e830b459
23 changed files with 923 additions and 171 deletions

17
LiloController.cs Normal file
View file

@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Mvc;
namespace LiloStitcher;
[ApiController]
[Route( "api/image" )]
public sealed class LiloController( LiloStitcher stitcher ) : ControllerBase
{
[HttpPost]
[Route( "generate" )]
[Produces( "image/png" )]
public async Task<IActionResult> Generate( [FromBody] GenerateRequest payload, CancellationToken ct )
{
var png = await stitcher.CreateImageAsync( payload, ct );
return File( png, "image/png" );
}
}