Skip to content

Fix/auth middleware type error 2#884

Open
Muhamadmust wants to merge 3 commits into
rinafcode:mainfrom
Muhamadmust:fix/auth-middleware-type-error-2
Open

Fix/auth middleware type error 2#884
Muhamadmust wants to merge 3 commits into
rinafcode:mainfrom
Muhamadmust:fix/auth-middleware-type-error-2

Conversation

@Muhamadmust

@Muhamadmust Muhamadmust commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

PR: Fix TypeScript Type-Check Errors in authMiddleware (#725)

Description

Fixes a CI build failure triggered during the pnpm run type-check phase. The error stems from an explicit type mismatch where a createdAt timestamp property was included in an object literal that strictly defines user attributes without it.

Changes Implemented

  • Updated src/lib/authMiddleware.ts: Removed the invalid createdAt property from the user object literals near lines 47 and 63.
  • Aligned Object Schemas: Strict alignment ensured across user types containing id, name, email, role, referralCount, referralCode, and referredBy.

Verification Checklist

  • Local type validation via pnpm run type-check succeeds with no errors.
  • Code structurally complies with TypeScript compiler rules without using any-casts.

Closes #725

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.

[Security] Feature flags admin endpoint lacks role-based authorization

1 participant