Add image generation

This commit is contained in:
2025-07-15 02:42:16 +02:00
parent 9cfbdc21d0
commit 480a38baac
17 changed files with 635 additions and 12 deletions

View File

@@ -12,7 +12,18 @@ public class HomeController(IMediator mediator) : ControllerBase
[HttpGet(Name = "GetHome")]
public async Task<ActionResult<WeatherInformation>> Get()
{
var result = await mediator.Send(new GetWeather.Command());
return Ok(result);
return Ok(await mediator.Send(new Weather.Command()));
}
[HttpGet("default.png")]
public async Task<IActionResult> GetImage()
{
return File(await mediator.Send(new ImageGeneration.Command()), "image/png");
}
[HttpGet("departureboard")]
public async Task<ActionResult<List<TimeTable>>> GetDepartureBoard()
{
return Ok(await mediator.Send(new DepartureBoard.Command()));
}
}