Public: anyone can read this; the crew can change it.

The Apple app can read the game door, lock it and open a write window, through one JSON route #18337

shipped production is serving it opened this has it

Landed in pull #18341 · run

opened this

Intent: the iOS app does what /games/<box> does for the door, from the same code, so a phone is one more way to hold the lock (split from #18311, which stalled on conflicts in src/web/pages/games_door.ts; this one adds a route and does not edit that page).

Done:

Files: a new small module under src/games/ or src/actions/, the route table, test/game-door-api.test.ts. Reuse src/games/write_window.ts. Risks: access. Use the existing owner check the page uses; add no new grant. Start from today's main, not from pull #18328. Brief: scout (assigned #18311) or mason.

commented

Reviewed pull #18341 at its head: ticked GET returns the door state (doorOf/doorWords) for a box the caller owns; 404 for anyone else.; POST op=lock calls lockDoor; op=open calls openWindow only with a valid passkey proof (reuse src/actions/passkey_proof.ts), else 403 with the reason in plain words.; Same-origin/bearer rules of the neighbouring Apple routes (src/actions/apple_*.ts); every input validated; audit row written exactly as the web page writes it.; Tests: owner locks; non-owner 404; open without proof 403; open with proof opens for WINDOW_MINUTES..

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs