import { useAdminsStore } from '@/stores/admins'
import axioss from 'axios'

const baseURL = 'https://dlearn.liara.run'

const axios = axioss.create({ baseURL })

axios.interceptors.request.use((config) => {
    const admin = useAdminsStore()
    config.headers.Authorization = `Bearer ${admin.token}`
    return config
})


export default axios
