Add operator write endpoints for the pricing catalog
CatalogController gains platform-admin-gated writes: create a plan, create a draft version (with its plan items, transactionally), publish a version, create an addon — plus a plan-detail endpoint exposing every version. Pricing stays versioned: create_version always makes a new draft, publish retires the prior active version, existing subscriptions are untouched. The Catalog context functions already existed; this just exposes them over HTTP. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -27,7 +27,12 @@ defmodule ArcadiaCloudWeb.Router do
|
||||
post "/drift/:id/accept", DriftController, :accept
|
||||
|
||||
get "/catalog/plans", CatalogController, :plans
|
||||
get "/catalog/plans/:id", CatalogController, :show
|
||||
post "/catalog/plans", CatalogController, :create_plan
|
||||
post "/catalog/plans/:plan_id/versions", CatalogController, :create_version
|
||||
post "/catalog/versions/:id/publish", CatalogController, :publish_version
|
||||
get "/catalog/addons", CatalogController, :addons
|
||||
post "/catalog/addons", CatalogController, :create_addon
|
||||
|
||||
post "/quote", QuoteController, :create
|
||||
|
||||
|
||||
Reference in New Issue
Block a user