Skip to content

[T2.5b] /verify-fc endpoint (single endpoint, 2 Neynar calls) #1243

Description

@realproject7

Epic: #1229 · Spec: §3.3, §6.3 · Type: CODE · Estimate: 0.3 day · Depends on: T2.4 + T2.4a

Scope

POST /api/airdrop/verify-fc
Body: { message, signature, username }
Action:

  • Verifies SIWE → recovers address
  • Calls verifyFc(username, PLOTLINK_FC_FID) from lib/airdrop/activation-verify.ts
  • Partial-failure semantics (RE1 Critical 3):
    • user_not_found → return 404, NO DB write
    • not_following → return 422, NO DB write (do NOT persist partial FC identity)
    • neynar_error → return 502, NO DB write
    • ok: true → commit pl_activations.{fid, fc_handle, fc_verified_at} atomically
  • UNIQUE INDEX on fid catches conflicts → return 409 conflict

Acceptance

  • All 4 partial-failure paths return correct HTTP status + NO DB write
  • Success path persists all 3 fields atomically
  • FID UNIQUE conflict returns 409
  • SIWE rejection returns 401

Dependencies

T2.4 (verifyFc helper), T2.4a (siwe-verify)

Metadata

Metadata

Assignees

No one assigned

    Labels

    airdropPLOT 10x Airdrop Campaign

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions