import { createPortfolio } from '../../lib/portfolio-store'

export default defineEventHandler(async (event) => {
  const { name } = await readBody<{ name?: string }>(event)
  return await createPortfolio(name?.trim() ?? '')
})
