mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-05-20 10:04:53 +00:00
🚀 Refactor: Centralize isBoardMember logic in EinundzwanzigPleb model and replace redundant checks
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
@php
|
||||
$boardVotes = $project->votes->filter(function ($vote) {
|
||||
return in_array($vote->einundzwanzigPleb->npub, config('einundzwanzig.config.current_board'));
|
||||
return $vote->einundzwanzigPleb->isBoardMember();
|
||||
});
|
||||
$approveCount = $boardVotes->where('value', 1)->count();
|
||||
$disapproveCount = $boardVotes->where('value', 0)->count();
|
||||
|
||||
Reference in New Issue
Block a user