[75] fix tournament list response being empty octet stream; docs, indentation#76
[75] fix tournament list response being empty octet stream; docs, indentation#76jakubmanczak merged 2 commits intomasterfrom
Conversation
There was a problem hiding this comment.
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.
| (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." |
There was a problem hiding this comment.
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.
Mateusz-Dobrzynski
left a comment
There was a problem hiding this comment.
Tested the code, indeed returns an empty JSON now. Documentation, however, was wrongly modified.
Closes #75 by implementing the outlined fixes. Also aligns indentation with whatever rustfmt outputs.