Pretty all the things I missed

My laptop didn't have lefthook running. Oops.
This commit is contained in:
Eli Ribble 2026-03-27 14:06:50 -07:00
parent f60bde7fd9
commit 4bbfbdb9e6
No known key found for this signature in database
30 changed files with 490 additions and 487 deletions

View file

@ -1,24 +1,24 @@
// src/api/axios.js or similar
import axios from 'axios';
import router from '@/router';
import axios from "axios";
import router from "@/router";
const apiClient = axios.create({
baseURL: '/api',
withCredentials: true
baseURL: "/api",
withCredentials: true,
});
// Response interceptor to catch auth failures
apiClient.interceptors.response.use(
(response) => response,
(error) => {
if (error.response && error.response.status === 401) {
// Session expired or not authenticated
router.push('/login');
}
return Promise.reject(error);
}
(response) => response,
(error) => {
if (error.response && error.response.status === 401) {
// Session expired or not authenticated
router.push("/login");
}
return Promise.reject(error);
},
);
apiClient.isAuthenticated = () => {
return true;
}
};
export default apiClient;