diff --git a/frontend/internal/handlers/location.go b/frontend/internal/handlers/location.go index e675274..56d98d6 100644 --- a/frontend/internal/handlers/location.go +++ b/frontend/internal/handlers/location.go @@ -3,11 +3,14 @@ package handlers import ( "net/http" + "github.com/jackc/pgx/v5/pgtype" + "wherewoof/frontend/internal/db" ) // locationData is passed to the owner's location page template. type locationData struct { + UpdatedAt pgtype.Timestamptz Lat float64 Lng float64 FinderPhone string @@ -44,6 +47,7 @@ func (a *App) ServeShort(w http.ResponseWriter, r *http.Request) { } data := locationData{ + UpdatedAt: tag.UpdatedAt, Lat: scan.Lat.Float64, Lng: scan.Lng.Float64, FinderPhone: scan.ScannerPhone.String, diff --git a/frontend/internal/handlers/tag_page.go b/frontend/internal/handlers/tag_page.go index 380db4c..260836b 100644 --- a/frontend/internal/handlers/tag_page.go +++ b/frontend/internal/handlers/tag_page.go @@ -11,6 +11,7 @@ import ( ) type publicData struct { + UpdatedAt pgtype.Timestamptz ID int64 TagCode string Status string @@ -47,6 +48,7 @@ func (a *App) PublicTag(w http.ResponseWriter, r *http.Request) { } pd := publicData{ + UpdatedAt: tag.UpdatedAt, ID: tag.ID, TagCode: tag.TagCode, Status: tag.Status, diff --git a/frontend/templates/location.html b/frontend/templates/location.html index 1521b20..8fe12a0 100644 --- a/frontend/templates/location.html +++ b/frontend/templates/location.html @@ -26,7 +26,7 @@
{{.Data.Name}}
{{end}} {{if .Data.Address}}{{.Data.Address}}
{{end}} diff --git a/frontend/templates/tag-edit-inline.html b/frontend/templates/tag-edit-inline.html index 26bf6b7..4ffa9bd 100644 --- a/frontend/templates/tag-edit-inline.html +++ b/frontend/templates/tag-edit-inline.html @@ -30,7 +30,7 @@