~netlandish/links-dev

links: Fix issue when parsing base url metadata v1 APPLIED

Peter Sanchez: 1
 Fix issue when parsing base url metadata

 1 files changed, 4 insertions(+), 4 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.code.netlandish.com/~netlandish/links-dev/patches/153/mbox | git am -3
Learn more about email & git

[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