fix(admin): correct 401 redirect path to include /admin prefix

The API interceptor was redirecting to /login on 401 errors, but since
admin-client is deployed under /admin/, it should redirect to /admin/login.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-01-10 07:57:43 -08:00
parent 731323ad7c
commit e6e69f15ce
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ api.interceptors.response.use(
(error) => {
if (error.response?.status === 401) {
localStorage.removeItem('admin_token');
window.location.href = '/login';
window.location.href = '/admin/login';
}
return Promise.reject(error);
}