Files
dezky/apps/operator/server/api/tenants/index.post.ts
T
Ronni Baslund be430179d9 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.
2026-05-24 22:31:49 +02:00

7 lines
219 B
TypeScript

import { platformApi } from '~~/server/utils/platform-api'
export default defineEventHandler(async (event) => {
const body = await readBody(event)
return platformApi(event, '/tenants', { method: 'POST', body })
})