릴리스: v1.4.11 프런트 API 명칭 정리 1차
This commit is contained in:
@@ -787,7 +787,7 @@ async function selectAdminTemplate(templateId) {
|
||||
|
||||
async function refreshTemplates() {
|
||||
try {
|
||||
const data = await api.listGames()
|
||||
const data = await api.listTopics()
|
||||
templates.value = data.games || []
|
||||
featuredTemplateIds.value = templates.value
|
||||
.filter((template) => template.displayRank != null)
|
||||
@@ -1170,7 +1170,7 @@ async function saveTemplateVisibility() {
|
||||
if (!selectedTemplate.value?.game?.id) return
|
||||
try {
|
||||
gameVisibilitySaving.value = true
|
||||
const data = await api.updateAdminGame(selectedTemplate.value.game.id, {
|
||||
const data = await api.updateAdminTemplate(selectedTemplate.value.game.id, {
|
||||
isPublic: !!selectedTemplate.value.game.isPublic,
|
||||
})
|
||||
selectedTemplate.value = {
|
||||
@@ -1244,7 +1244,7 @@ async function saveTemplateItemLabel(item) {
|
||||
|
||||
try {
|
||||
item.isSavingLabel = true
|
||||
const data = await api.updateAdminGameItem(selectedTemplateId.value, item.id, { label: nextLabel })
|
||||
const data = await api.updateAdminTemplateItem(selectedTemplateId.value, item.id, { label: nextLabel })
|
||||
item.label = data.item.label
|
||||
item.draftLabel = data.item.label
|
||||
success.value = '기본 아이템 이름을 수정했어요.'
|
||||
@@ -1589,7 +1589,7 @@ async function confirmTierListImport() {
|
||||
return
|
||||
}
|
||||
|
||||
const data = await api.createAdminGameTemplateFromTierList(tierList.id, {
|
||||
const data = await api.createAdminTemplateFromTierList(tierList.id, {
|
||||
gameId: nextGameId,
|
||||
name: nextGameName,
|
||||
itemIds,
|
||||
|
||||
@@ -54,8 +54,8 @@ async function loadTierLists() {
|
||||
isTopicLoading.value = true
|
||||
try {
|
||||
const [gameRes, listRes] = await Promise.all([
|
||||
api.getGame(topicId.value),
|
||||
api.searchPublicTierLists(topicId.value, query.value),
|
||||
api.getTopic(topicId.value),
|
||||
api.searchPublicTierListsByTopic(topicId.value, query.value),
|
||||
])
|
||||
topicName.value = gameRes.game?.name || ''
|
||||
brokenThumbnailIds.value = {}
|
||||
|
||||
@@ -36,7 +36,7 @@ const templates = computed(() => {
|
||||
|
||||
async function loadTemplates() {
|
||||
try {
|
||||
const data = await api.listGames()
|
||||
const data = await api.listTopics()
|
||||
templateRecords.value = data.games || []
|
||||
} catch (e) {
|
||||
error.value = '백엔드에 연결할 수 없어요. backend 서버가 실행 중인지 확인해주세요.'
|
||||
@@ -60,7 +60,7 @@ async function toggleFavorite(template, event) {
|
||||
|
||||
try {
|
||||
loadingFavoriteId.value = template.id
|
||||
const res = template.isFavorited ? await api.unfavoriteGame(template.id) : await api.favoriteGame(template.id)
|
||||
const res = template.isFavorited ? await api.unfavoriteTopic(template.id) : await api.favoriteTopic(template.id)
|
||||
templateRecords.value = templateRecords.value.map((entry) => (entry.id === template.id ? { ...entry, ...res.game } : entry))
|
||||
} catch (e) {
|
||||
error.value = '즐겨찾기 변경에 실패했어요.'
|
||||
|
||||
@@ -898,7 +898,7 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
try {
|
||||
const gameRes = await api.getGame(templateId.value)
|
||||
const gameRes = await api.getTopic(templateId.value)
|
||||
templateName.value = gameRes.game?.name || templateId.value
|
||||
const base = (gameRes.items || []).map((img) => ({
|
||||
id: img.id,
|
||||
|
||||
Reference in New Issue
Block a user