chore: commit current workspace changes
This commit is contained in:
@@ -343,12 +343,22 @@ final class WorldRewardService
|
||||
|
||||
public function artworkRewardBadges(Artwork $artwork): array
|
||||
{
|
||||
return WorldRewardGrant::query()
|
||||
$grants = WorldRewardGrant::query()
|
||||
->with('world')
|
||||
->where('artwork_id', (int) $artwork->id)
|
||||
->orderByRaw($this->sortCaseSql())
|
||||
->orderByDesc('granted_at')
|
||||
->get()
|
||||
->values();
|
||||
|
||||
World::primeCanonicalEditionIds(
|
||||
$grants->pluck('world')
|
||||
->filter()
|
||||
->pluck('recurrence_key')
|
||||
->all()
|
||||
);
|
||||
|
||||
return $grants
|
||||
->map(function (WorldRewardGrant $grant): array {
|
||||
$world = $grant->world;
|
||||
$rewardType = $grant->reward_type;
|
||||
|
||||
Reference in New Issue
Block a user