Initial commit

This commit is contained in:
2025-08-04 16:33:07 +03:30
commit f798e8e35c
9595 changed files with 1208683 additions and 0 deletions

10
resources/js/utils/api.js Normal file
View File

@@ -0,0 +1,10 @@
import { ofetch } from 'ofetch'
export const $api = ofetch.create({
baseURL: import.meta.env.VITE_API_BASE_URL || '/api',
async onRequest({ options }) {
const accessToken = useCookie('accessToken').value
if (accessToken)
options.headers.append('Authorization', `Bearer ${accessToken}`)
},
})