Skip to content

Commit fab6c20

Browse files
nekomeowwwluoling8192
authored andcommitted
fix(server,stage-web): auth & rename
1 parent ca45b0d commit fab6c20

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

apps/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@proj-airi/api-server",
2+
"name": "@proj-airi/server",
33
"type": "module",
44
"version": "0.0.1",
55
"private": true,

apps/stage-web/src/composables/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import type { AppType } from '../../../server/src/app'
22

33
import { hc } from 'hono/client'
44

5+
import { SERVER_URL } from '../libs/auth'
56
import { useAuthStore } from '../stores/auth'
6-
import { API_SERVER_URL } from './auth'
77

8-
export const client = hc<AppType>(API_SERVER_URL, {
8+
export const client = hc<AppType>(SERVER_URL, {
99
fetch: (input: RequestInfo | URL, init?: RequestInit) => {
1010
const authStore = useAuthStore()
1111
const headers = new Headers(init?.headers)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import { createAuthClient } from 'better-auth/vue'
22

33
import { useAuthStore } from '../stores/auth'
44

5-
export const API_SERVER_URL = import.meta.env.VITE_SERVER_URL || 'https://airi-api.moeru.ai'
5+
export const SERVER_URL = import.meta.env.VITE_SERVER_URL || 'https://airi-api.moeru.ai'
66

77
const authStore = useAuthStore()
88

99
export const authClient = createAuthClient({
10-
baseURL: API_SERVER_URL,
10+
baseURL: SERVER_URL,
1111

1212
credentials: 'include',
1313
fetchOptions: {

apps/stage-web/src/pages/auth/login.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { onMounted, ref } from 'vue'
33
import { useRouter } from 'vue-router'
44
import { toast } from 'vue-sonner'
55
6-
import { authClient, fetchSession } from '../../composables/auth'
6+
import { authClient, fetchSession } from '../../libs/auth'
77
import { useAuthStore } from '../../stores/auth'
88
99
const router = useRouter()

apps/stage-web/src/pages/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { breakpointsTailwind, useBreakpoints, useMouse } from '@vueuse/core'
2323
import { storeToRefs } from 'pinia'
2424
import { computed, onMounted, onUnmounted, ref, useTemplateRef, watch } from 'vue'
2525
26-
import { fetchSession } from '../composables/auth'
26+
import { fetchSession } from '../libs/auth'
2727
2828
const paused = ref(false)
2929

packages/stage-layouts/src/components/Layouts/HeaderAvatar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { computed, ref } from 'vue'
55
import { RouterLink } from 'vue-router'
66
import { toast } from 'vue-sonner'
77
8-
import { listSessions, signOut } from '../../composables/auth'
8+
import { listSessions, signOut } from '../../libs/auth'
99
import { useAuthStore } from '../../stores/auth'
1010
1111
const authStore = useAuthStore()

0 commit comments

Comments
 (0)