Skip to content

feat: add creator verification routes#469

Open
zuru122 wants to merge 1 commit intoStreamFi-x:devfrom
zuru122:feat/verification-routes
Open

feat: add creator verification routes#469
zuru122 wants to merge 1 commit intoStreamFi-x:devfrom
zuru122:feat/verification-routes

Conversation

@zuru122
Copy link
Copy Markdown

@zuru122 zuru122 commented Mar 27, 2026

#460

Summary

Adds creator verification API routes under app/api/routes-f/
verification/route.ts and app/api/routes-f/verification/admin/
route.ts.

This PR:

  • Adds GET /api/routes-f/verification to return the authenticated
    creator’s current verification status: unverified, pending,
    verified, or rejected.
  • Adds POST /api/routes-f/verification to submit a verification
    request with social_links, reason, and optional id_document_url.
  • Prevents creators from resubmitting while their request is still
    pending.
  • Adds GET /api/routes-f/verification/admin to list pending
    verification requests.
  • Restricts the admin endpoint via an allowlist-based admin session
    check using VERIFICATION_ADMIN_USER_IDS or
    VERIFICATION_ADMIN_EMAILS.
  • Keeps all implementation scoped exclusively to app/api/routes-f/
    verification/.

Implementation details:

  • Introduces a dedicated creator_verification_requests table
    created on demand by the route helper in app/api/routes-f/
    verification/_shared.ts.
  • Adds payload validation and normalization for social links and
    optional document URLs.
  • Adds focused Jest coverage in app/api/routes-f/verification/
    tests/route.test.ts.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

@zuru122 is attempting to deploy a commit to the david's projects Team on Vercel.

A member of the Team first needs to authorize it.

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