Skip to content

fix: resolve all test failures and type errors across api and shared packages#37

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier2-2803-1780337481
Open

fix: resolve all test failures and type errors across api and shared packages#37
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier2-2803-1780337481

Conversation

@stooit
Copy link
Copy Markdown
Contributor

@stooit stooit commented Jun 1, 2026

Summary

  • Fixed missing badRequest import in the users route handler (packages/api/src/routes/users.ts)
  • Corrected User type field name from userName to username in shared types (packages/shared/src/types.ts)
  • Fixed auth middleware case-sensitivity bug — public method matching now uses uppercase POST consistently (packages/api/src/middleware/auth.ts)
  • Implemented the paginate utility function that was previously a stub (packages/shared/src/utils/pagination.ts)
  • Added @types/node to tsconfig types for process.env references

Verification

All 22 tests pass and tsc --noEmit reports 0 type errors.

Assumptions

  • The User type's field should be username (matching the test expectations and API usage) rather than userName
  • The auth middleware should compare HTTP methods in uppercase (standard HTTP convention)
  • No test files were modified
  • No new dependencies were added

…packages

- Import missing badRequest helper in users route handler
- Fix User type field name (userName → username) in shared types
- Fix auth middleware case-sensitivity bug (POST method matching)
- Implement paginate utility function in shared package
- Add node types to tsconfig for process.env references
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