fix- staff deletion

This commit is contained in:
2026-01-06 02:02:37 +05:30
parent b45383de33
commit 7a4ea21658
3 changed files with 9 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ const API_BASE_URL = import.meta.env.VITE_API_BASE_URL_BACKEND ?? "";
async function throwIfResNotOk(res: Response) {
if (!res.ok) {
if (res.status === 401 || res.status === 403) {
if (res.status === 401) {
localStorage.removeItem("token");
if (!window.location.pathname.startsWith("/auth")) {
window.location.href = "/auth";