Skip to content

content-studio: add Instagram publish Next proxy route (#593) #598

@thxforall

Description

@thxforall

Parent

Parent: #593

What to build

Add the Next.js admin proxy route and web schemas for publishing an approved Instagram Feed Variant through the Rust API.

The route validates the admin session and request shape, then proxies to Rust. It must not call Meta directly and must not use a Supabase fallback for publishing.

Acceptance criteria

  • Web schemas include the publish request/response shape using imageAssetUrl, not arbitrary mediaUrl or accountId.
  • POST /api/v1/content/variants/[id]/publish/instagram requires an admin session.
  • Non-admin users receive 403.
  • Missing API_BASE_URL returns 503 with a clear Rust API required message.
  • When API_BASE_URL exists, the route proxies to Rust with the user bearer token.
  • The route does not call Meta directly.
  • The route does not fall back to Supabase for publishing.
  • Route tests cover admin requirement, 403, invalid request, successful proxy, upstream error passthrough, and missing API base.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions