This commit is contained in:
Mosiur
2026-04-24 21:03:01 +06:00
parent ad313f3b21
commit c295362495
2709 changed files with 877549 additions and 162 deletions

16
client/src/api/axios.ts Normal file
View File

@@ -0,0 +1,16 @@
import axios from 'axios';
const api = axios.create({
baseURL: "/api",
})
api.interceptors.request.use((config)=>{
const token = localStorage.getItem('token')
if (token) {
config.headers.Authorization = `Bearer ${token}`
}
return config
})
export default api