import { platformApi } from '~~/server/utils/platform-api'

export default defineEventHandler(async (event) => {
  const key = getRouterParam(event, 'key')
  const body = await readBody(event)
  return platformApi(event, `/flags/${key}`, { method: 'PATCH', body })
})
