From acfc0e03eb1e5afc710b09d277c3f67e8da87fe0 Mon Sep 17 00:00:00 2001 From: lavi <62757958+lavi27@users.noreply.github.com> Date: Sat, 13 Jan 2024 19:40:55 +0900 Subject: [PATCH] dump --- components/AppNavBar.vue | 2 +- pages/dashboard/members.vue | 2 +- pages/dashboard/verify.vue | 1 - utils/NetworkUtils.ts | 8 ++++++-- utils/discordAPI.ts | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/components/AppNavBar.vue b/components/AppNavBar.vue index f98022a..902f2a0 100644 --- a/components/AppNavBar.vue +++ b/components/AppNavBar.vue @@ -27,7 +27,7 @@ onClickOutside(serverSelectEl, clickServerMenu) onMounted(async () => { try { - serverData.value = await API.get.servers(Number(route.query.id)) + serverData.value = await API.get.servers(false) currentServerData.value = serverData.value[0] } catch (e) {} }) diff --git a/pages/dashboard/members.vue b/pages/dashboard/members.vue index e06e9a7..28adf79 100644 --- a/pages/dashboard/members.vue +++ b/pages/dashboard/members.vue @@ -174,7 +174,7 @@ const setBlackList = async () => { } const searchMember = (id: string) => { - //TODO - 스크롤시 추가적으로 로딩 되는것으로 변경 + //TODO - 페이지 형식 적용? memberList.value = [] const matcher = createFuzzyMatcher(id) diff --git a/pages/dashboard/verify.vue b/pages/dashboard/verify.vue index 244c90d..3156211 100644 --- a/pages/dashboard/verify.vue +++ b/pages/dashboard/verify.vue @@ -154,7 +154,6 @@ onMounted(async () => { try { const res = await API.get.verify(Number(route.query.id)) - //TODO - 이거 settings만 조건부로 나오는건가? if (res.settings) { // this.switch_.confirm = true // this.list.role.list = res.guild.roles diff --git a/utils/NetworkUtils.ts b/utils/NetworkUtils.ts index 4432121..5517113f8 100644 --- a/utils/NetworkUtils.ts +++ b/utils/NetworkUtils.ts @@ -1,5 +1,9 @@ -const catchNetworkErr = (e: any, doAlert: boolean = false) => { +import type { AxiosError } from 'axios' + +const catchNetworkErr = (e: AxiosError, doAlert: boolean = false) => { if (e.config?.url) console.error('NetworkErrorURL: ' + e.config.url) + console.error(e.name) + console.error(e.message) if (e.response) { console.error('NetworkError: Response received') @@ -7,7 +11,7 @@ const catchNetworkErr = (e: any, doAlert: boolean = false) => { console.error(e.response.status) console.error(e.response.headers) } else if (e.request) { - console.error('NetworkError: Response not received, could be CORS issue') + console.error('NetworkError: Response not received, it could be CORS issue') console.error(e.request) } else { console.error('NetworkError: Request not made') diff --git a/utils/discordAPI.ts b/utils/discordAPI.ts index 6423aa5..2432b4d 100644 --- a/utils/discordAPI.ts +++ b/utils/discordAPI.ts @@ -39,4 +39,4 @@ const getDiscordAPIUserData = async () => { return userData } -export { getDiscordAPIUserData } +export { discordCDNUrl, getDiscordAPIUserData }