[object Object]

← back to AsSeenInMovies

asseeninmovies: home-cache + /api/health expose credits_total (asim_credits row count). 56/56.

49969302dbaef128f15b21ddefb161cdd4c9143f · 2026-05-13 05:28:04 -0700 · SteveStudio2

Files touched

Diff

commit 49969302dbaef128f15b21ddefb161cdd4c9143f
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date:   Wed May 13 05:28:04 2026 -0700

    asseeninmovies: home-cache + /api/health expose credits_total (asim_credits row count). 56/56.
---
 server.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/server.js b/server.js
index 446f64b..83c6172 100644
--- a/server.js
+++ b/server.js
@@ -113,6 +113,7 @@ app.get('/api/health', async (_req, res) => {
       counts: stats ? {
         movies:  Number(stats.movies_total)   || 0,
         people:  Number(stats.people_total)   || 0,
+        credits: Number(stats.credits_total)  || 0,
         spotted: Number(stats.spotted_total)  || 0,
       } : null,
       as_of: stats && _homeCache.at ? new Date(_homeCache.at).toISOString() : null,
@@ -1543,6 +1544,7 @@ function startHomeRefresh() {
           (SELECT count(*) FROM asim_movies WHERE poster_url IS NOT NULL) AS movies_poster,
           (SELECT count(*) FROM asim_people) AS people_total,
           (SELECT count(*) FROM asim_people WHERE headshot_url IS NOT NULL) AS people_headshot,
+          (SELECT count(*) FROM asim_credits) AS credits_total,
           (SELECT count(*) FROM asim_spotted WHERE verified_at IS NOT NULL AND (verified_by IS NULL OR verified_by NOT LIKE 'rejected%')) AS spotted_total`),
       pool.query(`SELECT id, title, release_year, poster_url FROM asim_movies WHERE poster_url IS NOT NULL ORDER BY random() LIMIT 6`),
       pool.query(`SELECT id, full_name, headshot_url, primary_profession FROM asim_people WHERE headshot_url IS NOT NULL ORDER BY random() LIMIT 6`),

← 391cd93 asseeninmovies: smoke +4 security-header checks (X-Content-T  ·  back to AsSeenInMovies  ·  asseeninmovies: home stat-row — show credits count (363,323 d17d0a5 →