Skip to content

feat: implement routes-b referrals/earnings, products delete, routed deposits addresses delete, feature-flags#1075

Merged
davedumto merged 1 commit into
davedumto:mainfrom
gelluisaac:feat
Jun 24, 2026
Merged

feat: implement routes-b referrals/earnings, products delete, routed deposits addresses delete, feature-flags#1075
davedumto merged 1 commit into
davedumto:mainfrom
gelluisaac:feat

Conversation

@gelluisaac

Copy link
Copy Markdown
Contributor

Implemented endpoints

  1. GET /api/routes-b/referrals/earningsapp/api/routes-b/referrals/earnings/route.ts

    • Fetches ReferralEarning rows for the authenticated referrer.
    • Supports optional status, limit (capped at 100), and offset query params.
    • Returns structured JSON with earnings array and pagination.
  2. DELETE /api/routes-b/products/[id]app/api/routes-b/products/[id]/route.ts

    • Soft-deletes a product by setting isActive = false.
    • Validates ownership via where: { id, userId: user.id }.
    • Returns 204 No Content on success.
  3. DELETE /api/routes-d/deposits/addresses/[id]app/api/routes-d/deposits/addresses/[id]/route.ts

    • Archives a deposit address by setting status = "archived".
    • Enforces ownership and returns 403 Forbidden when the address belongs to another user.
  4. GET /api/routes-d/feature-flagsapp/api/routes-d/feature-flags/route.ts

    • Returns the current feature flags for the authenticated user.
    • Auth-required; structured envelope matches other routes.

Test results

All 24 new tests pass:

@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

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

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 24, 2026

Copy link
Copy Markdown

@gelluisaac Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@davedumto davedumto merged commit c755a10 into davedumto:main Jun 24, 2026
1 of 3 checks passed
@gelluisaac gelluisaac deleted the feat branch June 24, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants