Forgotten to commit
This commit is contained in:
1 parent
7d2351f314
commit
9e386e8f65
77 files changed
+36236
-74515
No files matched your search
@@ -0,0 +1,25 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using YongeStreet.Services;
|
||||
|
||||
namespace YongeStreet.Controllers;
|
||||
|
||||
record City(string name, int id);
|
||||
|
||||
public class ApiController: Controller
|
||||
{
|
||||
|
||||
private readonly DataService _dataService;
|
||||
private readonly ILogger<ApiController> _logger;
|
||||
|
||||
public ApiController(DataService dataService, ILogger<ApiController> logger)
|
||||
{
|
||||
_dataService = dataService;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public JsonResult Roads(string city, int year=2025)
|
||||
{
|
||||
return Json(_dataService.GetRoads(city, year));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user