Skip to content

Fix Subscriber-Aware Post Visibility and Handle Routing #60

Description

@aji70

Task: Fix Subscriber-Aware Post Visibility and Handle Routing

Overview

Creator posts routing/visibility has gaps: handle resolution may not match string handles, and subscriber checks can fail to unlock subscribers-only content. Fix so public vs subscriber visibility works correctly.


Goals

  • Resolve creator by handle string via CreatorsService.getByHandle
  • Optional JWT: if fan has active subscription, include subscribers posts
  • Helper: SubscriptionsService.isActiveSubscriber(fanId, creatorId)
  • GET /api/v1/creators/:handle/posts works with handles like creator_one

Deliverables

  • Optional JWT guard/middleware pattern
  • Updated posts controller + integration tests
  • Swagger updates for optional auth

Acceptance Criteria

  • Handle-based route resolves string handles (not numeric-only)
  • Unauthenticated sees only public posts
  • Subscribed fan sees public + subscribers
  • Unsubscribed fan never sees subscribers posts
  • Invalid handle → 404
  • At least 8 tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions