← back to AsSeenInMovies
asseeninmovies: GET /random/spotted — 302 to a random verified placement on its parent /movie/:id#spotted page. Completes the /random/{movie,person,spotted} trio. 59/59.
921ea62ddf936d2527e5caf38994aea679216d2b · 2026-05-13 06:16:38 -0700 · SteveStudio2
Files touched
Diff
commit 921ea62ddf936d2527e5caf38994aea679216d2b
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Wed May 13 06:16:38 2026 -0700
asseeninmovies: GET /random/spotted — 302 to a random verified placement on its parent /movie/:id#spotted page. Completes the /random/{movie,person,spotted} trio. 59/59.
---
server.js | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/server.js b/server.js
index 1c5bac1..87cc86f 100644
--- a/server.js
+++ b/server.js
@@ -1924,6 +1924,13 @@ app.get('/random/person', async (_req, res) => {
res.redirect(`/person/${r.rows[0].id}`);
} catch (_e) { res.redirect('/people'); }
});
+app.get('/random/spotted', async (_req, res) => {
+ try {
+ const r = await pool.query(`SELECT movie_id FROM asim_spotted WHERE verified_at IS NOT NULL AND (verified_by IS NULL OR verified_by NOT LIKE 'rejected%') ORDER BY random() LIMIT 1`);
+ if (!r.rows[0]) return res.redirect('/spotted');
+ res.redirect(`/movie/${r.rows[0].movie_id}#spotted`);
+ } catch (_e) { res.redirect('/spotted'); }
+});
// Bots and link previewers that don't honor <link rel="icon"> in the head
// still GET /favicon.ico — serve the same inline SVG so server logs don't
← ee14e9d asseeninmovies: smoke +2 /api/spotted/random checks. 59/59.
·
back to AsSeenInMovies
·
asseeninmovies: smoke +2 /random/spotted checks. 61/61. 070a207 →