v1.4.5: 게시물 작성자·편집 링크·목록 요약 보정

- posts.author_id 마이그레이션 및 owner/admin 단일 계정 환경에서만 기존 글 backfill
- 공개 상세: 글쓴이 본인일 때만 공유 옆 수정 링크 표시, 수정 시각 제거
- 목록 요약: excerpt 없을 때 본문 fallback, post-summary-clamp로 말줄임 처리
- 회원 세션 API에 isAdmin·role 추가
This commit is contained in:
2026-05-22 14:43:22 +09:00
parent 8f53210756
commit 38ca3a4709
16 changed files with 215 additions and 47 deletions

View File

@@ -9,7 +9,7 @@ import { updateAdminPost } from '../../../../repositories/content-repository'
* @returns {Promise<Object>} 수정된 게시물
*/
export default defineEventHandler(async (event) => {
requireAdminSession(event)
const adminSession = requireAdminSession(event)
const id = getRouterParam(event, 'id')
const parsedBody = parseAdminPostInput(await readBody(event))
@@ -22,7 +22,7 @@ export default defineEventHandler(async (event) => {
}
try {
const post = await updateAdminPost(id, parsedBody.data)
const post = await updateAdminPost(id, parsedBody.data, adminSession.userId)
if (!post) {
throw createError({