Skip to content

refactor(auth): replace any-cast authenticate fallback with typed pre…#608

Closed
yachikadev wants to merge 2 commits into
Dev-Card:mainfrom
yachikadev:fix/auth-fallback-cleanup
Closed

refactor(auth): replace any-cast authenticate fallback with typed pre…#608
yachikadev wants to merge 2 commits into
Dev-Card:mainfrom
yachikadev:fix/auth-fallback-cleanup

Conversation

@yachikadev

@yachikadev yachikadev commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces all (app as any).authenticate fallback chains with properly
typed preHandler — same pattern established in for team.ts.

Changes

  • cards.ts — auth cleanup
  • connect.ts — auth cleanup
  • event.ts — auth cleanup + fixed TS generic types on route methods
  • nfc.ts — auth cleanup + removed unused imports

Test Results

  • tsc --noEmit — 0 errors
  • eslint — 0 errors, 0 warnings
  • Tests — 69/69 passed

Closes #594

…Handler

- Remove (app as any).authenticate fallback chains in cards.ts, connect.ts, event.ts, nfc.ts
- Use preHandler: [(req, reply) => app.authenticate(req, reply)] consistently
- Fix TS generic types on route methods to resolve tsc errors

Closes Dev-Card#554
@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

@yachikadev is attempting to deploy a commit to the Prashantkumar Khatri's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added backend gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking. labels Jun 19, 2026
@github-actions

Copy link
Copy Markdown

Hi @yachikadev,

Thanks for opening this pull request.

This PR has been automatically classified based on the files modified.

Applied Labels

  • gssoc:approved
  • backend

Primary Review Area

  • backend

Reviewer

@Harxhit has been identified as the primary reviewer for this pull request.

If you have any questions regarding the affected area or implementation details, feel free to reach out to the assigned reviewer.

Thank you for your contribution!

Signed-off-by: Yachika Sharma <shakuntalaramphalsharma@gmail.com>
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

CI — Checks Failed

Backend — FAIL

Check Result
Lint PASS
Test PASS
Typecheck FAIL

Mobile — SKIP

Check Result
Lint -
Test -

Web — SKIP

Check Result
Build -

Last updated: Fri, 19 Jun 2026 09:32:08 GMT

@yachikadev

Copy link
Copy Markdown
Contributor Author

@Harxhit,
the CI failure is due to @devcard/shared module not found error
which appears to be a pre-existing infrastructure issue unrelated to
my changes. Could you please check?

@Harxhit

Harxhit commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

@yachikadev Please fix merge conflicts.

@yachikadev

Copy link
Copy Markdown
Contributor Author

Facing some git issues with this PR, closing and reopening a fresh one. #626

@yachikadev yachikadev closed this Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(backend): remove (app as any).authenticate fallback chains from remaining route files

2 participants