import { listPostCommentsBySlug } from '../../../repositories/comment-repository' /** * 게시물 댓글 목록 조회 API * @param {import('h3').H3Event} event - 요청 이벤트 * @returns {Promise<{ comments: Array }>} 댓글 목록 */ export default defineEventHandler(async (event) => { const slug = String(getRouterParam(event, 'slug') || '') const comments = await listPostCommentsBySlug(slug) return { comments } })