parse-dashboard-analytics 7.4.20 → 7.4.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1184,7 +1184,7 @@ You have direct access to the Parse database through function calls, so you can
1184
1184
  });
1185
1185
 
1186
1186
  // Analytics dashboard routes - Only serve custom analytics if analyticsPage is configured
1187
- app.get('/apps/:appId/analytics_dashboard', function(req, res) {
1187
+ app.get('/apps/:appId/analytics_dashboard', function(req, res, next) {
1188
1188
  console.log('🎯 Analytics dashboard route hit:', req.path, req.url);
1189
1189
 
1190
1190
  if (users && (!req.user || !req.user.isAuthenticated)) {
@@ -1235,11 +1235,12 @@ You have direct access to the Parse database through function calls, so you can
1235
1235
 
1236
1236
  // No custom analytics page configured or file not found - let React component handle it
1237
1237
  console.log('🔄 No custom analyticsPage configured, falling through to React component');
1238
- return; // This will fall through to the catch-all route for React routing
1238
+ // A bare return never answered: the page hung on reload or a direct link.
1239
+ return next(); // on to the catch-all route for React routing
1239
1240
  });
1240
1241
 
1241
1242
  // Alternative analytics dashboard route (with slash instead of underscore)
1242
- app.get('/apps/:appId/analytics/dashboard', function(req, res) {
1243
+ app.get('/apps/:appId/analytics/dashboard', function(req, res, next) {
1243
1244
  console.log('🎯 Alternative analytics route hit:', req.path, req.url);
1244
1245
 
1245
1246
  if (users && (!req.user || !req.user.isAuthenticated)) {
@@ -1290,7 +1291,8 @@ You have direct access to the Parse database through function calls, so you can
1290
1291
 
1291
1292
  // No custom analytics page configured or file not found - let React component handle it
1292
1293
  console.log('🔄 No custom analyticsPage configured, falling through to React component');
1293
- return; // This will fall through to the catch-all route for React routing
1294
+ // A bare return never answered: the page hung on reload or a direct link.
1295
+ return next(); // on to the catch-all route for React routing
1294
1296
  });
1295
1297
 
1296
1298
  // For every other request, go to index.html. Let client-side handle the rest.