In one commit. Yes, you're seeing it right. Yes, I don't know what I was thinking.
21 lines
504 B
C#
21 lines
504 B
C#
using System.Collections.Generic;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Server.Services.Interfaces;
|
|
|
|
namespace Server.Controllers.V2;
|
|
|
|
[ApiController]
|
|
[ApiExplorerSettings(GroupName = "v2")]
|
|
[Route("/v2/[controller]")]
|
|
public class StationsController : Controller {
|
|
private IDatabase Database { get; }
|
|
|
|
public StationsController(IDatabase database) {
|
|
this.Database = database;
|
|
}
|
|
|
|
[HttpGet("")]
|
|
public ActionResult<IEnumerable<IStationRecord>> ListStations() {
|
|
return Ok(Database.Stations);
|
|
}
|
|
}
|