Skip to content

Commit ff308d1

Browse files
alexp8Sneer-ra2
andauthored
Develop to main (#398)
* Duplicate handling. * Added page of list with active duplicates. * Full IP-check for confirmed duplicates. * Simplification. * Removed comment. * Small update. * Added database migration. * Added unit test. * track observers * move comment * update image.php * fix null pointer (#379) * Develop (#380) (#381) * Duplicate handling. * Added page of list with active duplicates. * Full IP-check for confirmed duplicates. * Simplification. * Removed comment. * Small update. * Added database migration. * Added unit test. * track observers * move comment * update image.php * fix null pointer (#379) --------- Co-authored-by: Sneer <[email protected]> Co-authored-by: Sneer-ra2 <[email protected]> * add more logs (#382) * add more logs * update log * Fix for createPlayer. * fix bug where disconnect gave everyone minus points (#385) * fix bug where disconnect gave everyone minus points * fix ladder info map issue * Improved naming on elo page. * Improved description for duplicate reason. * bug fix * Database migration for user ratings. Player details and tooltip adjustments. * Updated admin rating page. * Quick fix. * Simplified conditions. * Fixed user settings update. * new implementation (#390) * verify observer is streaming on twitch (#384) * Show bans from duplicates. (#389) Co-authored-by: Alex Peterson <[email protected]> * bug fix (#392) * quick fix * Feature/track observers (#395) * bug fix * logging updates, 2v2 match bug fix, observer code * filter out spectator in point rewards * fix typo * bug fixes --------- Co-authored-by: Sneer <[email protected]> Co-authored-by: Sneer-ra2 <[email protected]>
1 parent 0beb0b3 commit ff308d1

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

cncnet-api/app/Http/Controllers/LadderController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,13 @@ public function getLadderGame(Request $request, $date = null, $cncnetGame = null
225225
}
226226
else
227227
{
228-
$allGameReports = $game->report()->get();
228+
$allGameReports = $game->report;
229229
$userIsMod = false;
230230
}
231231

232232
if ($reportId !== null)
233233
{
234-
$gameReport = $game->allReports()->where('game_reports.id', '=', $reportId)->first();
234+
$gameReport = $game->allReports->where('id', $reportId)->first();
235235
}
236236
else
237237
{

cncnet-api/app/Models/Game.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,9 @@ public function gameClips()
108108

109109
public function observers()
110110
{
111-
if (!$this->report)
112-
{
113-
return collect();
114-
}
115-
116-
return PlayerGameReport::where('game_report_id', $this->report->id)
111+
return $this->hasMany(PlayerGameReport::class, 'game_report_id', 'game_report_id')
117112
->where('spectator', true)
118-
->with(['player', 'user'])
119-
->get();
113+
->with(['player', 'user']);
120114
}
121115

122116

@@ -126,7 +120,7 @@ public function players()
126120
{
127121
return collect();
128122
}
129-
123+
130124
return PlayerGameReport::where('game_report_id', $this->report->id)
131125
->where('spectator', false)
132126
->with('player');

0 commit comments

Comments
 (0)