Commit c774507
Develop (#528)
* Add points field to daily stats API and optimize query performance (#523)
* Add points field to daily stats API and optimize query performance
Reduces database queries from 3 to 1 by replacing correlated subqueries with eager loading and PHP-based aggregation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* show streamer name
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Refactor player stats to service layer and add monthly stats endpoint
Extracted player time-range stats logic from controller to StatsService for better separation of concerns and reusability.
Changes:
- Add StatsService::getPlayerTimeRangeStats() method for flexible time-range queries
- Refactor getPlayerDailyStats to use service (reduced from ~80 to ~45 lines)
- Add new getPlayerMonthlyStats endpoint at /api/v1/ladder/{game}/player/{player}/month
- Consistent caching strategy (5 min) for both daily and monthly stats
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix bug
* show qm map description
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0a3f154 commit c774507
2 files changed
Lines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
41 | 42 | | |
42 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
426 | | - | |
| 426 | + | |
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| 434 | + | |
| 435 | + | |
434 | 436 | | |
435 | 437 | | |
436 | 438 | | |
| |||
477 | 479 | | |
478 | 480 | | |
479 | 481 | | |
480 | | - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
481 | 487 | | |
482 | 488 | | |
483 | 489 | | |
| |||
496 | 502 | | |
497 | 503 | | |
498 | 504 | | |
| 505 | + | |
499 | 506 | | |
500 | 507 | | |
501 | 508 | | |
| |||
534 | 541 | | |
535 | 542 | | |
536 | 543 | | |
537 | | - | |
| 544 | + | |
| 545 | + | |
538 | 546 | | |
539 | 547 | | |
540 | 548 | | |
| |||
0 commit comments