rental request email to owner

This commit is contained in:
jackiettran
2025-10-15 15:19:23 -04:00
parent b9e6cfc54d
commit 407c69aa22
9 changed files with 658 additions and 56 deletions

View File

@@ -58,13 +58,9 @@ api.interceptors.request.use(async (config) => {
if (["POST", "PUT", "DELETE", "PATCH"].includes(method)) {
// If we don't have a CSRF token yet, try to fetch it
if (!csrfToken) {
// Skip fetching for most auth endpoints to avoid circular dependency
// Exception: /auth/google needs CSRF token and should auto-fetch as fallback
const isAuthEndpoint =
config.url?.includes("/auth/") &&
!config.url?.includes("/auth/refresh") &&
!config.url?.includes("/auth/google");
if (!isAuthEndpoint) {
// Skip fetching only for the CSRF token endpoint itself to avoid circular dependency
const isCsrfEndpoint = config.url?.includes("/auth/csrf-token");
if (!isCsrfEndpoint) {
await fetchCSRFToken();
}
}