fbbb43e3e2
- Partners list with name/domain/status/customers/margin + Create modal - Partner detail: contract card, contact card, customers table, attach modal, terminate (soft-delete) danger card - Operator proxies for /partners + /partners/:slug/tenants - platform-api: add partnerId Prop to Tenant schema. The field was being silently dropped by Mongoose because the schema didn't declare it. - tenants.service: rewrite update() to build $set/$unset explicitly and cast partnerId via new Types.ObjectId(). Handles detach via $unset so the field vanishes from the doc cleanly.
8 lines
253 B
TypeScript
8 lines
253 B
TypeScript
import { platformApi } from '~~/server/utils/platform-api'
|
|
|
|
export default defineEventHandler(async (event) => {
|
|
const slug = getRouterParam(event, 'slug')
|
|
await platformApi(event, `/partners/${slug}`, { method: 'DELETE' })
|
|
return { ok: true }
|
|
})
|