be430179d9
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.
7 lines
219 B
TypeScript
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 })
|
|
})
|