diff --git a/db/queries/locations.sql b/db/queries/locations.sql index 1a15813..0bf700e 100644 --- a/db/queries/locations.sql +++ b/db/queries/locations.sql @@ -24,6 +24,7 @@ SELECT l.id, l.name, l.address, + COALESCE(l.google_maps_link, '') as google_maps_link, l.thumbnail, l.submitted_by, COALESCE(r.regency_name, '') as regency_name, diff --git a/db/sqlc/locations.sql.go b/db/sqlc/locations.sql.go index c974938..6b5d4e5 100644 --- a/db/sqlc/locations.sql.go +++ b/db/sqlc/locations.sql.go @@ -151,6 +151,7 @@ SELECT l.id, l.name, l.address, + COALESCE(l.google_maps_link, '') as google_maps_link, l.thumbnail, l.submitted_by, COALESCE(r.regency_name, '') as regency_name, @@ -169,6 +170,7 @@ type GetLocationRow struct { ID int32 `json:"id"` Name string `json:"name"` Address string `json:"address"` + GoogleMapsLink string `json:"google_maps_link"` Thumbnail sql.NullString `json:"thumbnail"` SubmittedBy int32 `json:"submitted_by"` RegencyName string `json:"regency_name"` @@ -184,6 +186,7 @@ func (q *Queries) GetLocation(ctx context.Context, id int32) (GetLocationRow, er &i.ID, &i.Name, &i.Address, + &i.GoogleMapsLink, &i.Thumbnail, &i.SubmittedBy, &i.RegencyName,