diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2025-04-20 20:15:55 +0200 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2025-04-20 20:15:55 +0200 |
| commit | 3676b1d1d9216a676c7d5a40affa5b3256ca8df3 (patch) | |
| tree | efa63a0d21ae52e32e405fe7b4ce56b02d782e86 /Backend | |
| parent | c86b4655f72c86362c064dd50bb701782b39e6eb (diff) | |
Refactor stop data handling with caching and custom names support
Diffstat (limited to 'Backend')
| -rw-r--r-- | Backend/.vscode/extensions.json | 5 | ||||
| -rw-r--r-- | Backend/GetStopList.cs | 31 |
2 files changed, 0 insertions, 36 deletions
diff --git a/Backend/.vscode/extensions.json b/Backend/.vscode/extensions.json deleted file mode 100644 index dde673d..0000000 --- a/Backend/.vscode/extensions.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "recommendations": [ - "ms-azuretools.vscode-azurefunctions" - ] -}
\ No newline at end of file diff --git a/Backend/GetStopList.cs b/Backend/GetStopList.cs deleted file mode 100644 index e3a1894..0000000 --- a/Backend/GetStopList.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Microsoft.Azure.Functions.Worker; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using Costasdev.VigoTransitApi; - -namespace Costasdev.UrbanoVigoWeb; - -public class GetStopList -{ - private readonly VigoTransitApiClient _api; - - public GetStopList(HttpClient http) - { - _api = new VigoTransitApiClient(http); - } - - [Function("GetStopList")] - public async Task<IActionResult> Run([HttpTrigger(AuthorizationLevel.Anonymous, "get")] HttpRequest req) - { - try - { - var stops = await _api.GetStops(); - return new OkObjectResult(stops); - } - catch (InvalidOperationException) - { - return new BadRequestObjectResult("Failed to retrieve stops"); - } - } -} - |
