feat(operator): create tenant from the operator UI

Wires the previously-dead 'New tenant' button on /tenants to a modal
that collects slug + name + plan + optional primary domain, POSTs to
the existing platform-api /tenants endpoint via a new operator proxy,
and navigates into the freshly-created tenant detail page. Slug
auto-derives from the name until the operator types in the slug field
themselves. Billing details and provisioning are still done from the
tenant detail page after creation — this modal is the minimum that
backend validators will accept.
This commit is contained in:
Ronni Baslund
2026-05-24 22:31:49 +02:00
parent 114b419a69
commit be430179d9
3 changed files with 284 additions and 1 deletions
@@ -0,0 +1,6 @@
import { platformApi } from '~~/server/utils/platform-api'
export default defineEventHandler(async (event) => {
const body = await readBody(event)
return platformApi(event, '/tenants', { method: 'POST', body })
})