initial commit

This commit is contained in:
2026-03-12 06:37:16 +08:00
commit c31ebd35e7
41 changed files with 6272 additions and 0 deletions

13
src/api.ts Normal file
View File

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