~netlandish/links-dev

links: Fix ISE when toggling a note as read/unread. v1 APPLIED

Peter Sanchez: 1
 Fix ISE when toggling a  note as read/unread.

 1 files changed, 1 insertions(+), 7 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/199/mbox | git am -3
Learn more about email & git

[PATCH links] Fix ISE when toggling a note as read/unread. Export this patch

Changelog-fixed: Bug in GraphQL resolver not allowing the toggling of
  the unread flag for notes
---
 api/graph/schema.resolvers.go | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/api/graph/schema.resolvers.go b/api/graph/schema.resolvers.go
index a1584ca..3c28046 100644
--- a/api/graph/schema.resolvers.go
+++ b/api/graph/schema.resolvers.go
@@ -749,12 +749,6 @@ func (r *mutationResolver) UpdateLink(ctx context.Context, input *model.UpdateLi
	}

	if input.Unread != nil {
		if orgLink.Type == models.NoteType {
			validator.Error("%s", lt.Translate("You are not allowed to edit this field for notes")).
				WithField("unread").
				WithCode(valid.ErrValidationCode)
			return nil, nil
		}
		orgLink.Unread = *input.Unread
	}

@@ -5036,7 +5030,7 @@ func (r *queryResolver) Version(ctx context.Context) (*model.Version, error) {
	return &model.Version{
		Major:           0,
		Minor:           9,
		Patch:           0,
		Patch:           1,
		DeprecationDate: nil,
	}, nil
}
-- 
2.49.1
Applied.

To git@git.code.netlandish.com:~netlandish/links
   1fdf348..c334752  master -> master