diff --git a/pages/dashboard/index.vue b/pages/dashboard/index.vue index 4212a78..ed69db7 100644 --- a/pages/dashboard/index.vue +++ b/pages/dashboard/index.vue @@ -11,7 +11,7 @@ -
+
@@ -112,7 +112,7 @@
-
+

@@ -350,7 +350,7 @@ export default { ).data this.isPermission = settings.koreanbots.data.voted - this.isEnterprise = settings.payData?.type == 'ENTERPRISE' && new Date().getTime() < settings.payData?.expire + this.isEnterprise = settings.payData?.type === 'ENTERPRISE' && new Date().getTime() < settings.payData?.expire if (settings.settings) { if (settings.settings.status != 0) { @@ -377,7 +377,10 @@ export default { this.connState = 1 } catch (e) { if (e.response) { - if (e.response.data.message == 'Missing Access') { + if (e.response.status === 401) { + window.localStorage.removeItem('access_token') + this.$router.push(`/${this.$i18n.locale}/auth/login`) + } else if (e.response.data.message === 'Missing Access') { this.$router.push(`/${this.$i18n.locale}/servers`) } } diff --git a/pages/dashboard/members.vue b/pages/dashboard/members.vue index 514e1c2..9efbaa9 100644 --- a/pages/dashboard/members.vue +++ b/pages/dashboard/members.vue @@ -10,7 +10,7 @@ {{ $t('members.title') }}

-
+
-
+

{{ $t('verify.category1.title') }} @@ -55,7 +55,7 @@ :placeholder="$t('verify.category1.rolePlaceholder')" />
    -
  • +
  • {{ role?.name }}
@@ -158,7 +158,10 @@ export default { this.connState = 1 } catch (e) { if (e.response) { - if (e.response.data.message == 'Missing Access') { + if (e.response.status === 401) { + window.localStorage.removeItem('access_token') + this.$router.push(`/${this.$i18n.locale}/auth/login`) + } else if (e.response.data.message === 'Missing Access') { this.$router.push(`/${this.$i18n.locale}/servers`) } } diff --git a/pages/servers.vue b/pages/servers.vue index 1243c52..48c0af4 100644 --- a/pages/servers.vue +++ b/pages/servers.vue @@ -11,7 +11,7 @@ -
+
{ window.location.reload() }, e.response?.data.error.retry_after * 1000) + } else if (e.response?.status === 401) { + window.localStorage.removeItem('access_token') + this.$router.push(`/${this.$i18n.locale}/auth/login`) } else { this.connState = 2 } } + return } else { this.$router.push(`/${this.$i18n.locale}/auth/login`)