Chat
This commit is contained in:
@@ -27,6 +27,8 @@ Every press records the zone, the points, and the exact remaining time in millis
|
||||
|
||||
Logged-in players can also join the mailing list.
|
||||
|
||||
The Chat section is a simple public chatroom. Logged-in players can post plain-text messages (up to 200 characters, one message every two seconds). The latest 100 messages are displayed oldest first and refresh every five seconds while Chat is open. Messages persist in SQLite across restarts, including after the game ends. There are no editing, deletion, or moderation controls yet.
|
||||
|
||||
## Running
|
||||
|
||||
### Docker (recommended)
|
||||
@@ -90,6 +92,8 @@ Tip: `BUTTON_DURATION_SECONDS=60` makes for quick testing.
|
||||
| POST | `/api/press` | ✓ | Press the button |
|
||||
| GET | `/api/me` | ✓ | Your score, zone counts, and press history |
|
||||
| GET | `/api/leaderboard` | | Public player names, total points, and press counts |
|
||||
| GET | `/api/chat` | | Latest 100 public chat messages |
|
||||
| POST | `/api/chat` | ✓ | `{message}` → saved message; 200-character limit |
|
||||
| GET | `/api/stats` | | Global stats (403 until the game ends) |
|
||||
| POST | `/api/subscribe` | ✓ | `{first_name, email, last_name?, phone?}` |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user