import { assertOwnTenant } from '@voltro/plugin-multitenancy/guard' import type { AppContext } from '@voltro/runtime' const execute = async ( input: { tenantId: string; title: string; body: string }, ctx: AppContext, ) => { assertOwnTenant(input.tenantId, ctx.request.subject) return ctx.store.insert('notes', { title: input.title, body: input.body, tenantId: input.tenantId, }) } export default execute