Skip to content

Commit

Permalink
fix: missed decode
Browse files Browse the repository at this point in the history
  • Loading branch information
ScuffedNewt committed Jan 12, 2025
1 parent 8e996c1 commit f86abdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Services/GalleryManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ public function castVote($action, $submission, $user) {

// Get existing vote data if it exists, remove any existing vote data for the user,
// add the new vote data, and json encode it
$voteData = (isset($submission->vote_data) ? collect(json_decode($submission->vote_data, true)) : collect([]));
$voteData = (isset($submission->vote_data) ? collect($submission->vote_data, true) : collect([]));
$voteData->get($user->id) ? $voteData->pull($user->id) : null;
$voteData->put($user->id, $vote);
$submission->vote_data = $voteData->toJson();
Expand Down

0 comments on commit f86abdb

Please sign in to comment.