[PATCH links] Fix issue when parsing base url metadata
Export this patch
---
models/base_url.go | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/models/base_url.go b/models/base_url.go
index 5b1b484..5585804 100644
--- a/models/base_url.go
+++ b/models/base_url.go
@@ -161,14 +161,14 @@ func (b *BaseURL) Store(ctx context.Context) error {
ON CONFLICT (url) DO UPDATE
SET url = NULL
WHERE FALSE
- RETURNING id, url, public_ready, created_on
+ RETURNING id, url, public_ready, visibility, created_on
)
- SELECT id, url, public_ready, created_on FROM ins
+ SELECT id, url, public_ready, visibility, created_on FROM ins
UNION ALL
- SELECT id, url, public_ready, created_on FROM base_urls
+ SELECT id, url, public_ready, visibility, created_on FROM base_urls
WHERE url = $1
LIMIT 1;`, b.URL, b.Hash)
- err := row.Scan(&b.ID, &b.URL, &b.PublicReady, &b.CreatedOn)
+ err := row.Scan(&b.ID, &b.URL, &b.PublicReady, &b.Visibility, &b.CreatedOn)
if err != nil {
return err
}
--
2.49.0
Applied.
To git@git.code.netlandish.com:~netlandish/links
4c28f35..23918f3 master -> master