feat(member): 회원 설정/헤더 상태 UI와 관리자 멤버 관리 추가
로그인 상태를 헤더에서 즉시 인지하고 계정 관리를 이어갈 수 있도록 사용자 설정과 관리자 멤버 관측 기능을 연결했다. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
16
server/api/posts/[slug]/comments.get.js
Normal file
16
server/api/posts/[slug]/comments.get.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import { listPostCommentsBySlug } from '../../../repositories/comment-repository'
|
||||
|
||||
/**
|
||||
* 게시물 댓글 목록 조회 API
|
||||
* @param {import('h3').H3Event} event - 요청 이벤트
|
||||
* @returns {Promise<{ comments: Array<Object> }>} 댓글 목록
|
||||
*/
|
||||
export default defineEventHandler(async (event) => {
|
||||
const slug = String(getRouterParam(event, 'slug') || '')
|
||||
const comments = await listPostCommentsBySlug(slug)
|
||||
|
||||
return {
|
||||
comments
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user