Skip to content

fix: make all tests pass and eliminate type errors - #199

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier2-2177-1790439506
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier2-2177-1790439506

Conversation

@stooit

@stooit stooit commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • auth middleware: public-method list used lowercase "post"; c.req.method is uppercase so POST was wrongly rejected. Now "POST", compared case-insensitively.
  • users route: badRequest was used but not imported (ReferenceError → 500 instead of 400).
  • shared types: User.userName renamed to username to match all consumers.
  • pagination: implemented paginate() (1-indexed pages, Math.ceil totalPages, empty data for out-of-range pages).
  • tsconfig: added "types": ["bun-types"] (already a devDependency) so tsc resolves bun:test and process.

Verification

  • bun test: 22 pass, 0 fail
  • bunx tsc --noEmit: exit 0

Assumptions / notes

  • tsc isn't on PATH here; ran via bunx tsc.
  • POST being public is the documented intent per the middleware docblock and tests; worth revisiting against authentication policy before production.
  • No test files modified, no dependencies added.

@stooit stooit changed the title fix: repair auth method casing, shared User type, missing import, and implement paginate fix: make all tests pass and eliminate type errors Sep 26, 2026
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.

1 participant