Skip to content

Commit

Permalink
Merge pull request #249 from P3D-Legacy/228-my-save
Browse files Browse the repository at this point in the history
  • Loading branch information
dsbilling authored Feb 1, 2023
2 parents 669e915 + dcf8ff3 commit 9d260cc
Show file tree
Hide file tree
Showing 14 changed files with 4,462 additions and 681 deletions.
3 changes: 3 additions & 0 deletions app/Console/Commands/SyncGameSave.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ private function handleGameSave($gamejolt_user_id, $api)
}
$game_save = GameSave::where(['user_id' => $gja->user_id])->first();
if ($game_save) {
$this->info('Updating game save for user '.$gja->username);
$game_save->update($result);
$game_save->touch(); // Update updated_at
} else {
$this->info('Creating game save for user '.$gja->username);
$result['user_id'] = $gja->user_id;
GameSave::create($result);
}
Expand Down
Loading

0 comments on commit 9d260cc

Please sign in to comment.