릴리스: v1.4.28 관리자 템플릿 내부 이름층 추가 정리

This commit is contained in:
2026-04-02 21:14:43 +09:00
parent d0ebc97bc3
commit b3575d59a6
9 changed files with 112 additions and 100 deletions

View File

@@ -788,7 +788,7 @@ async function getTopicDetail(topicId) {
const topic = await findTopicById(topicId)
if (!topic) return null
const items = await listTopicItems(topicId)
return { topic, game: topic, items }
return { topic, template: topic, items }
}
async function createTopic({ id, name, isPublic = true }) {
@@ -1193,7 +1193,7 @@ async function cleanupMissingUploadReferences() {
for (const row of gameItemRows) {
if (await fileExistsForUploadSrc(row.src)) continue
await deleteGameItem(row.id)
await deleteTopicItem(row.id)
stats.deletedGameItems += 1
}

View File

@@ -187,7 +187,7 @@ router.post('/templates/:templateId/thumbnail', requireAdmin, upload.single('thu
const optimized = await writeOptimizedImage({
file: req.file,
directory: 'games',
directory: 'topics',
width: 1280,
height: 1280,
fit: 'inside',
@@ -214,7 +214,7 @@ router.post('/templates/:templateId/images', requireAdmin, upload.array('images'
files.map(async (file, index) => {
const optimized = await writeOptimizedImage({
file,
directory: 'games',
directory: 'topics',
width: 512,
height: 512,
fit: 'inside',
@@ -593,7 +593,7 @@ async function createTemplateFromTierList({ tierList, templateId, templateName }
)
}
return { game: await findTopicById(templateId), items: createdItems }
return { template: await findTopicById(templateId), items: createdItems }
}
async function createTemplateFromRequest({ templateRequest, templateId, templateName }) {
@@ -609,7 +609,7 @@ async function createTemplateFromRequest({ templateRequest, templateId, template
templateId,
})
return { game: await findTopicById(templateId), items }
return { template: await findTopicById(templateId), items }
}
router.delete('/custom-items/:itemId', requireAdmin, async (req, res) => {