Handle fetch fail in client app, fix data binding in location data (#243)

* Improve error handling for server rendered routes

* Fix data binding issue for country/state codes (use alias in sql)
This commit is contained in:
2026-08-23 03:26:48 -04:00
committed by Aaron Po
parent bfd45842fe
commit 31da1d557c
10 changed files with 97 additions and 185 deletions

View File

@@ -50,10 +50,10 @@ public class BreweryRepository(ISqlConnectionFactory connectionFactory)
c.CityName,
sp.StateProvinceID,
sp.StateProvinceName,
sp.ISO3166_2,
sp.ISO3166_2 AS Iso31662,
co.CountryID,
co.CountryName,
co.ISO3166_1
co.ISO3166_1 AS Iso31661
FROM dbo.BreweryPost bp
LEFT JOIN dbo.BreweryPostLocation bpl ON bp.BreweryPostID = bpl.BreweryPostID
LEFT JOIN dbo.City c ON bpl.CityID = c.CityID
@@ -100,10 +100,10 @@ public class BreweryRepository(ISqlConnectionFactory connectionFactory)
c.CityName,
sp.StateProvinceID,
sp.StateProvinceName,
sp.ISO3166_2,
sp.ISO3166_2 AS Iso31662,
co.CountryID,
co.CountryName,
co.ISO3166_1
co.ISO3166_1 AS Iso31661
FROM dbo.BreweryPost bp
LEFT JOIN dbo.BreweryPostLocation bpl ON bp.BreweryPostID = bpl.BreweryPostID
LEFT JOIN dbo.City c ON bpl.CityID = c.CityID