From e8ddd24caf9adcb0d79d9733d49eee680757dc76 Mon Sep 17 00:00:00 2001 From: Arild Matsson Date: Mon, 5 Feb 2024 15:42:55 +0100 Subject: [PATCH] Make api default export --- src/App.vue | 2 +- src/api/api.ts | 2 +- src/api/backend.composable.ts | 2 +- src/api/backendInfo.composable.ts | 2 +- src/auth/auth.composable.ts | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/App.vue b/src/App.vue index ebcee62..b0bbf31 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,7 +2,7 @@ import { computed } from "vue"; import { useRoute } from "vue-router"; import { useTitle } from "@vueuse/core"; -import { api } from "@/api/api"; +import api from "@/api/api"; import * as util from "@/util"; import { useAuth } from "@/auth/auth.composable"; import useLocale from "@/i18n/locale.composable"; diff --git a/src/api/api.ts b/src/api/api.ts index 4b13cb5..f4a7328 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -232,4 +232,4 @@ class MinkApi { } /** API client singleton instance. */ -export const api = new MinkApi(); +export default new MinkApi(); diff --git a/src/api/backend.composable.ts b/src/api/backend.composable.ts index a71313a..c27466a 100644 --- a/src/api/backend.composable.ts +++ b/src/api/backend.composable.ts @@ -1,5 +1,5 @@ import { useI18n } from "vue-i18n"; -import { api } from "./api"; +import api from "./api"; import useSpin from "@/spin/spin.composable"; /** Wraps API endpoints with Spin. */ diff --git a/src/api/backendInfo.composable.ts b/src/api/backendInfo.composable.ts index 3799185..384a682 100644 --- a/src/api/backendInfo.composable.ts +++ b/src/api/backendInfo.composable.ts @@ -1,5 +1,5 @@ import { computed, readonly, ref } from "vue"; -import { api } from "./api"; +import api from "./api"; import type { InfoData } from "./api.types"; import { keyBy, objsToDict } from "@/util"; diff --git a/src/auth/auth.composable.ts b/src/auth/auth.composable.ts index 81d2012..3250deb 100644 --- a/src/auth/auth.composable.ts +++ b/src/auth/auth.composable.ts @@ -1,9 +1,9 @@ import { computed, ref } from "vue"; import { useI18n } from "vue-i18n"; import { useRouter, useRoute } from "vue-router"; -import useSpin from "@/spin/spin.composable"; import { checkLogin } from "./auth"; -import { api } from "@/api/api"; +import api from "@/api/api"; +import useSpin from "@/spin/spin.composable"; import { canAdmin, decodeJwt, type JwtSbPayload } from "./jwtSb"; /**