fix(Core): fix bug is lock

This commit is contained in:
2026-05-17 00:00:13 +03:30
parent 2796ce7de7
commit c3d798689c
8 changed files with 52 additions and 30 deletions

View File

@@ -23,7 +23,7 @@ class GateController extends Controller
$gates->getCollection()->transform(function ($gate) {
unset($gate['book_id']);
$gate['is_locked'] = auth()->user()->isSubscriber() !== false ? false : Law::where('is_locked', $gate['law_id'])->first()?->is_locked;
$gate['is_locked'] = auth()->user()->isSubscriber() !== false ? false : Law::where('id', $gate['law_id'])->first()?->is_locked;
unset($gate['law_id']);