Jake Vanderwerf
5 days ago a9b3b28d001941921aa70d37fdc87c758a163a44
assets/js/concise/Referral.js
@@ -78,7 +78,7 @@
               endpoint: 'referrals/stats',
               TTL: 5 * 60 * 1000,
               showLoading: false,
               delayFetch: false,
               delayFetch: true,
               filters: {
                  type: 'dashboard',
                  user: window.auth.getUser()
@@ -91,7 +91,7 @@
               endpoint: 'referrals',
               TTL: 10 * 60 * 1000,
               showLoading: false,
               delayFetch: false,
               delayFetch: true,
               filters: {
                  user: window.auth.getUser(),
                  status: 'all',
@@ -692,16 +692,11 @@
         return { success: false, message: 'Invalid endpoint' };
      }
      const response = await fetch(`${jvbSettings.api}${endpoint}`, {
      const response = await window.auth.fetch(`${jvbSettings.api}${endpoint}`, {
         method: 'POST',
         headers: {
            'Content-Type': 'application/json',
            'X-WP-Nonce': window.auth.getNonce(),
         },
         body: JSON.stringify(data)
      });
      // Add error handling to see the actual response
      if (!response.ok) {
         const errorText = await response.text();
         console.error('Error response:', response.status, errorText);