- commit
- 866891353b827d3a81519b1ca5914db1c5774f57
- parent
- f72a9e5cbc1b6184faac4dec7273e40bd2b1253b
- author
- dami <gazey55@gmail.com>
| M | site/ | 6 | +++++- |
@@ -28,7 +28,11 @@ export function gamesDir(): string {
2828 }2929 3030 export function logPath(gameId: string): string {31- if (!/^[a-zA-Z0-9_-]{1,80}$/.test(gameId)) throw new Error("bad game id");31+ // a game id, or a set-aside log of one (`<id>.reset-<n>`): replayable,32+ // never in the calendar or the boards33+ if (!/^[a-zA-Z0-9_-]{1,80}(\.reset-\d+)?$/.test(gameId)) {34+ throw new Error("bad game id");35+ }3236 return `${gamesDir()}${gameId}.jsonl`;3337 }3438