Skip to content

Commit

Permalink
Make api default export
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed Feb 5, 2024
1 parent 87ed340 commit e8ddd24
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,4 @@ class MinkApi {
}

/** API client singleton instance. */
export const api = new MinkApi();
export default new MinkApi();
2 changes: 1 addition & 1 deletion src/api/backend.composable.ts
Original file line number Diff line number Diff line change
@@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion src/api/backendInfo.composable.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
4 changes: 2 additions & 2 deletions src/auth/auth.composable.ts
Original file line number Diff line number Diff line change
@@ -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";

/**
Expand Down

0 comments on commit e8ddd24

Please sign in to comment.