export default defineEventHandler(async () => {
  const data = await readYaml<{ messages: any[] }>('messages.yml')
  return data.messages.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime())
})
