Add initial device status service

This commit is contained in:
2022-08-17 16:27:28 -04:00
parent 054396d242
commit 2d14463132
18 changed files with 648 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
using Microsoft.AspNetCore.Mvc;
namespace Service.Controllers
{
[Route("[controller]")]
[ApiController]
public class StatusController : ControllerBase
{
private readonly DeviceRepository _deviceRepository;
public StatusController(DeviceRepository deviceRepository)
{
_deviceRepository = deviceRepository;
}
[HttpGet("recent")]
public ActionResult<IEnumerable<Device>> GetRecent()
{
return _deviceRepository.Values;
}
}
}