Add image generation (#2)

* Add image generation

* Optimise for minimal memory

* Added a new ui

* Add support for esp
This commit was merged in pull request #2.
This commit is contained in:
2025-07-19 19:11:31 +02:00
committed by GitHub
parent e9d145455e
commit e21601234a
25 changed files with 1188 additions and 31 deletions

View File

@@ -6,13 +6,30 @@ using Microsoft.AspNetCore.Mvc;
namespace HomeApi.Controllers;
[ApiController]
[Route("[controller]")]
[Route("home")]
public class HomeController(IMediator mediator) : ControllerBase
{
[HttpGet(Name = "GetHome")]
[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.jpg")]
public async Task<IActionResult> GetImage()
{
return File(await mediator.Send(new ImageGeneration.Command()), "image/jpeg");
}
[HttpGet("configuration")]
public async Task<ActionResult<MicroProcessorConfiguration>> GetCombinedBuffers()
{
return Ok(await mediator.Send(new Configuration.Command()));
}
[HttpGet("departure-board")]
public async Task<ActionResult<List<TimeTable>>> GetDepartureBoard()
{
return Ok(await mediator.Send(new DepartureBoard.Command()));
}
}