Serve the picks from the API, so the live picker reads them

The picker read circuits/photos.json and seasons/photos.json relative to
itself. The API serves only /examples/, so the live page showed two HTTP
404 errors and a "Load it from disk" box for each.

The API now serves both picks files, read-only, at /picks/circuits.json
and /picks/seasons.json. Each answer is the file as the poster service
has it loaded, from the same loader it draws from: the notes first, then
the entries, a refused entry left out. The root route lists both routes.

The picker reads them from the API its site picks. Only a page opened
from a working copy (file:, or a loopback host) falls back to the
repository's files. A failure names each address and why.

Builds: docs/posters.md, Picking photos, as written in 780984064f (the lead's lines 1-4 of 2026-11-30 and answers Q1, Q2)

Claude-Session: https://claude.ai/code/session_01JG73KFhbaNj3tyJ8tKmE3W
This commit is contained in:
2026-11-30 10:18:16 +01:00
parent 780984064f
commit 250828710c
7 changed files with 148 additions and 51 deletions
+1 -1
View File
@@ -114,7 +114,7 @@
<p>Choose a freely licensed Wikimedia Commons photo per circuit layout and per season, seen as the poster crops it, and copy its entry for the picks file.</p>
<ul>
<li><code>examples/data/candidates.json</code></li>
<li><code>circuits/photos.json</code>, <code>seasons/photos.json</code></li>
<li><code>/picks/circuits.json</code>, <code>/picks/seasons.json</code></li>
</ul>
</a>
<a class="page" href="licences.html">