base commit

This commit is contained in:
@kirill.komarov
2026-04-28 21:36:30 +05:00
parent 55480d4aa5
commit 2148fd7a12
24 changed files with 1578 additions and 121 deletions
+12
View File
@@ -5,3 +5,15 @@ export const apiClient = axios.create({
baseURL: apiBaseURL,
headers: { 'Content-Type': 'application/json' },
})
apiClient.interceptors.request.use((config) => {
try {
const token = localStorage.getItem('craftshop_auth_token')
if (!token) return config
config.headers = config.headers ?? {}
config.headers.Authorization = `Bearer ${token}`
return config
} catch {
return config
}
})