Skip to content

server: fix broken item neighbors API#1040

Merged
zhenghaoz merged 1 commit into
masterfrom
compact
Aug 16, 2025
Merged

server: fix broken item neighbors API#1040
zhenghaoz merged 1 commit into
masterfrom
compact

Conversation

@zhenghaoz

Copy link
Copy Markdown
Collaborator

No description provided.

@zhenghaoz
zhenghaoz requested a review from Copilot August 16, 2025 03:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the ReadCategories function to accept a default categories parameter, addressing broken item neighbors API behavior. The change allows different endpoints to specify appropriate default categories instead of always defaulting to an empty string.

  • Modified ReadCategories function signature to accept a defaultCategories parameter
  • Updated all callers to pass explicit default categories: []string{""} for most endpoints, nil for item neighbors and collaborative endpoints
  • Ensures consistent category handling across different API endpoints

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
server/rest.go Updated ReadCategories function signature and all its callers to pass appropriate default categories
master/rest.go Updated calls to ReadCategories to include default categories parameter

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread server/rest.go
Comment thread server/rest.go
@zhenghaoz
zhenghaoz merged commit 653ff74 into master Aug 16, 2025
11 checks passed
@zhenghaoz
zhenghaoz deleted the compact branch August 16, 2025 03:06
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