This commit is contained in:
MEHMETKECECI
2026-02-11 17:46:22 +03:00
commit eacfacb13b
266 changed files with 51337 additions and 0 deletions
View File
+21
View File
@@ -0,0 +1,21 @@
import { boot } from 'quasar/wrappers'
import axios from 'axios'
export const api = axios.create({
baseURL: 'http://localhost:8080/api',
timeout: 180000,
withCredentials: true // refresh cookie kullanıyorsan kalsın
})
export default boot(() => {
api.interceptors.request.use((config) => {
const token = localStorage.getItem('token') // ✅ senin authStore keyin
if (token) {
config.headers = config.headers || {}
config.headers.Authorization = `Bearer ${token}`
}
return config
})
})
+14
View File
@@ -0,0 +1,14 @@
// src/boot/dayjs.js
import dayjs from 'dayjs'
import customParseFormat from 'dayjs/plugin/customParseFormat.js'
import relativeTime from 'dayjs/plugin/relativeTime.js'
import localizedFormat from 'dayjs/plugin/localizedFormat.js'
import 'dayjs/locale/tr.js'
// 🔹 Pluginleri aktif et
dayjs.extend(customParseFormat)
dayjs.extend(relativeTime)
dayjs.extend(localizedFormat)
dayjs.locale('tr')
export default dayjs