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:
@@ -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 })
|
||||
})
|
||||
Reference in New Issue
Block a user