태그 헤더 이미지 설정 추가

This commit is contained in:
2026-06-26 18:08:05 +09:00
parent 6d74425415
commit 67ea58ccc2
16 changed files with 340 additions and 25 deletions

View File

@@ -94,6 +94,9 @@ const mapTagRow = (row) => ({
name: row.name,
slug: row.slug,
description: row.description,
headerImageUrl: row.header_image_url || '',
headerTitle: row.header_title || '',
headerText: row.header_text || '',
sortOrder: row.sort_order,
color: row.color,
tagType: row.tag_type || 'managed',
@@ -743,6 +746,9 @@ export const listTags = async ({ tagType, searchQuery = '', limit } = {}) => {
if (!sql) {
const sampleTags = getSampleTags().map((tag) => ({
...tag,
headerImageUrl: tag.headerImageUrl || '',
headerTitle: tag.headerTitle || '',
headerText: tag.headerText || '',
tagType: 'managed',
postCount: 0,
lastUsedAt: null,
@@ -1327,8 +1333,8 @@ export const createAdminTag = async (input) => {
}
const rows = await sql`
INSERT INTO tags (name, slug, description, sort_order, color, tag_type)
VALUES (${input.name}, ${input.slug}, ${input.description}, ${input.sortOrder}, ${input.color}, ${input.tagType})
INSERT INTO tags (name, slug, description, header_image_url, header_title, header_text, sort_order, color, tag_type)
VALUES (${input.name}, ${input.slug}, ${input.description}, ${input.headerImageUrl}, ${input.headerTitle}, ${input.headerText}, ${input.sortOrder}, ${input.color}, ${input.tagType})
RETURNING *
`
@@ -1354,6 +1360,9 @@ export const updateAdminTag = async (id, input) => {
name = ${input.name},
slug = ${input.slug},
description = ${input.description},
header_image_url = ${input.headerImageUrl},
header_title = ${input.headerTitle},
header_text = ${input.headerText},
sort_order = ${input.sortOrder},
color = ${input.color},
tag_type = ${input.tagType},