Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
publicMethodshad lowercase"post"; Hono gives you methods in uppercase, so POST never matched. Changed to"POST".User.userNametousernameto match the routes and tests.badRequestimport. Without it, invalid payloads crashed with a ReferenceError at runtime.paginatestub to match the contract in the test file (it computes total and totalPages, and an out-of-range page returns an empty list)."types": ["bun-types"]sobun:testandprocessresolve.bun-typeswas already a devDependency.Verification
bun test && tsc --noEmit: 22 pass, 0 fail, no type errors. An internal review found no blocking issues.Assumptions / notes
username, so I treated that as the correct spelling and changed the shared type to match. No test files were modified and no dependencies were added.paginatetreats a non-positive or non-numeric page or size as 1. No test checks this.auth.test.tsexpects POST to need no token, so this PR makes unauthenticated user creation work. Also, ifAPI_TOKENis unset the API falls back to"test-token". Neither is safe outside a test fixture. I left both alone because they're out of scope.