feat: restore postcreate.js

This commit is contained in:
yanghao05
2025-04-18 15:03:20 +08:00
parent ac65302601
commit d81111226e
3 changed files with 10 additions and 69 deletions

View File

@@ -1,4 +1,3 @@
import { useAuthStore } from '@/stores/auth';
import axios from 'axios';
// Create axios instance with default config
@@ -13,10 +12,6 @@ const client = axios.create({
// Request interceptor
client.interceptors.request.use(
config => {
const authStore = useAuthStore();
if (authStore.isAuthenticated && authStore.token) {
config.headers.Authorization = `Bearer ${authStore.token}`;
}
return config;
},
error => {