@rmdes/indiekit-endpoint-funkwhale 1.0.5 → 1.0.6
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.
|
@@ -66,16 +66,21 @@ export const dashboardController = {
|
|
|
66
66
|
// Get stats from cache (same source as public API)
|
|
67
67
|
// If cache is empty, try to refresh it from database
|
|
68
68
|
let cachedStats = getCachedStats();
|
|
69
|
+
console.log("[Funkwhale Dashboard] cachedStats:", cachedStats ? "exists" : "null");
|
|
69
70
|
if (!cachedStats) {
|
|
70
71
|
const getDb = request.app.locals.application.getFunkwhaleDb;
|
|
72
|
+
console.log("[Funkwhale Dashboard] getFunkwhaleDb:", getDb ? "exists" : "null");
|
|
71
73
|
if (getDb) {
|
|
72
74
|
const db = getDb();
|
|
75
|
+
console.log("[Funkwhale Dashboard] db:", db ? "exists" : "null");
|
|
73
76
|
if (db) {
|
|
74
77
|
cachedStats = await refreshStatsCache(db, limits);
|
|
78
|
+
console.log("[Funkwhale Dashboard] after refresh:", cachedStats ? "exists" : "null");
|
|
75
79
|
}
|
|
76
80
|
}
|
|
77
81
|
}
|
|
78
82
|
const summary = cachedStats?.summary?.all || null;
|
|
83
|
+
console.log("[Funkwhale Dashboard] summary:", JSON.stringify(summary));
|
|
79
84
|
|
|
80
85
|
// Determine public frontend URL (strip 'api' from mount path)
|
|
81
86
|
// e.g., /funkwhaleapi -> /funkwhale
|
package/package.json
CHANGED