This commit is contained in:
@@ -41,7 +41,7 @@ apiClient.interceptors.request.use(
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn("Failed to retrieve auth token:", error);
|
||||
// Auth token retrieval failed - request will proceed without token
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ apiClient.interceptors.response.use(
|
||||
|
||||
// กรณี Token หมดอายุ หรือ ไม่มีสิทธิ์
|
||||
if (status === 401) {
|
||||
console.error("Unauthorized: Please login again.");
|
||||
// Unauthorized: redirect handled by auth interceptor
|
||||
// สามารถเพิ่ม Logic Redirect ไปหน้า Login ได้ถ้าต้องการ
|
||||
}
|
||||
}
|
||||
|
||||
@@ -300,7 +300,6 @@ export const numberingApi = {
|
||||
): Promise<{ number: string }> => {
|
||||
// Fallback mock for legacy UI - requires proper context for real use
|
||||
const mockNumber = `TEST-${new Date().getFullYear()}-${String(Math.floor(Math.random() * 9999)).padStart(4, '0')}`;
|
||||
console.log('Using mock generateTestNumber. Context:', context);
|
||||
return { number: mockNumber };
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user