Skip to content

Conversation

@jakubmanczak
Copy link
Member

Closes #75 by implementing the outlined fixes. Also aligns indentation with whatever rustfmt outputs.

Copy link

Copilot AI left a comment

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 an issue where the tournament list response was returning an empty octet stream instead of a proper JSON response. The changes also include code formatting improvements to align with rustfmt standards.

  • Removed logic that returned an empty vector when no tournaments are visible, allowing proper JSON response
  • Removed outdated API documentation for 401 status code
  • Applied consistent code formatting and indentation throughout the file

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

@jakubmanczak jakubmanczak changed the title fix tournament list response being empty octet stream; docs, indentation [75] fix tournament list response being empty octet stream; docs, indentation Oct 11, 2025
(status=400, description = "Bad request"),
(
status=401,
description = "The user is not permitted to list any tournaments, meaning they do not have any roles within any tournament."
Copy link
Member

@Mateusz-Dobrzynski Mateusz-Dobrzynski Oct 12, 2025

Choose a reason for hiding this comment

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

401 is among possible responses served by this endpoint and as such must be documented. It occurs when making a request without logging in (and possibly in some other cases that I don't remember at the moment). This description is obviously wrong (must've been copy-pasted from some other endpoint relating to a single tournament), but the solution here is to correct it, not delete altogether.

Copy link
Member

@Mateusz-Dobrzynski Mateusz-Dobrzynski left a comment

Choose a reason for hiding this comment

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

Tested the code, indeed returns an empty JSON now. Documentation, however, was wrongly modified.

@jakubmanczak jakubmanczak merged commit ed7eb6f into master Oct 12, 2025
1 check 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.

Empty tournament list response is an empty octet stream; documentation doesn't match up

3 participants