feat(enakgame): filter play history by game and status

GET /customer/enakgame/sessions takes optional game_id and status, so a game
reloaded mid-play finds the session it was running (status=STARTED) instead
of starting a new one and charging EnakCoin again. An invalid game_id or
status is refused.

integration-enakgame.md §4.4 now describes recovery after a reload: keep the
session_id in sessionStorage, continue a STARTED session before expires_at,
and call complete again for a COMPLETED one to get the full answer, prize
included. The mobile guide and RFC §11 mention the filters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
efrilm
2026-10-08 12:51:39 +07:00
co-authored by Claude Opus 5.5
parent b5d2cd491a
commit 52e8fe11c6
10 changed files with 129 additions and 24 deletions
+1 -1
View File
@@ -842,7 +842,7 @@ tambahkan snapshot harian, bukan cache yang di-invalidate.
| `POST` | `/sessions` | §7.1. Wajib `Idempotency-Key` |
| `POST` | `/sessions/:id/complete` | §7.2. Idempotent tanpa header |
| `GET` | `/sessions/:id` | Status dan hasil |
| `GET` | `/sessions` | Riwayat main |
| `GET` | `/sessions` | Riwayat main; filter opsional `game_id`, `status` (dipakai game untuk menemukan session `STARTED` setelah reload) |
Prefix `/enakgame` dipakai karena `/customer/games` sudah dipakai alur spin lama.