Skip to content

A self-hosted media server and file management system

chore: code smells

aminnausincfb84191f20e
diff --git a/resources/js/App.vue b/resources/js/App.vue
index 281a9442..0fbd3c83 100755
--- a/resources/js/App.vue
+++ b/resources/js/App.vue
@@ -1,9 +1,9 @@
<script setup lang="ts">
-import type { ToastPostion } from './types/pinesTypes';
+import type { ToastPostion } from '@/types/pinesTypes';
-import { onMounted, onUnmounted, ref, watch } from 'vue';
-import { getScreenSize } from './service/util';
-import { useAuthStore } from './stores/AuthStore';
+import { onMounted, ref, watch } from 'vue';
+import { getScreenSize } from '@/service/util';
+import { useAuthStore } from '@/stores/AuthStore';
import { storeToRefs } from 'pinia';
import { useAppStore } from '@/stores/AppStore';
import { RouterView } from 'vue-router';
diff --git a/resources/js/service/api.ts b/resources/js/service/api.ts
index 412f06eb..3dbb71a8 100644
--- a/resources/js/service/api.ts
+++ b/resources/js/service/api.ts
@@ -1,10 +1,8 @@
import { useAuthStore } from '@/stores/AuthStore';
-import { AxiosError } from 'axios';
import { toast } from '@/service/toaster/toastService';
+import axios, { AxiosError } from 'axios';
import nProgress from 'nprogress';
-import axios from 'axios';
-import { useRouter } from 'vue-router';
let progressTimeout: NodeJS.Timeout;
@@ -20,7 +18,7 @@ const handleError = async (error: AxiosError<{ message?: string }>) => {
const auth = useAuthStore();
const message = error.response?.data?.message ?? error.message;
- const status = error.response?.status || 0;
+ const status = error.response?.status ?? 0;
// if the server throws an error (404, 500 etc.)
const knownError = [401, 422, 500, 404, 419].includes(status);