feat: restore postcreate.js
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user