Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix internal error on pin/unpin #4332

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

AvoidMe
Copy link
Contributor

@AvoidMe AvoidMe commented Jan 30, 2025

Solves: #4331

Seems like query in UpdateMemo is empty, because pin/unpin actually updates only memo_organizer table.

		} else if path == "pinned" {
			if _, err := s.Store.UpsertMemoOrganizer(ctx, &store.MemoOrganizer{
				MemoID: id,
				UserID: user.ID,
				Pinned: request.Memo.Pinned,
			}); err != nil {
				return nil, status.Errorf(codes.Internal, "failed to upsert memo organizer")
			}

Not sure if this is how maintainers wants to solve it, this is first time I'm looking at memos code.
But I'm willing to improve/rewrite pr if any changes requrired.

@AvoidMe AvoidMe requested a review from boojack as a code owner January 30, 2025 22:25
Copy link
Collaborator

@johnnyjoygh johnnyjoygh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@johnnyjoygh johnnyjoygh merged commit 7ed3a12 into usememos:main Jan 31, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants