릴리스: v1.4.28 관리자 템플릿 내부 이름층 추가 정리
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user