fix(Core): fix bug is lock
This commit is contained in:
@@ -25,11 +25,11 @@ class PartController extends Controller
|
||||
|
||||
$parts->getCollection()->transform(function ($part) {
|
||||
unset($part['book_id']);
|
||||
$gate['is_locked'] = auth()->user()->isSubscriber() !== false ? false : Law::where('is_locked', $part['law_id'])->first()?->is_locked;
|
||||
$part['is_locked'] = auth()->user()->isSubscriber() !== false ? false : Law::where('id', $part['law_id'])->first()?->is_locked;
|
||||
|
||||
unset($gate['law_id']);
|
||||
unset($part['law_id']);
|
||||
|
||||
return $gate;
|
||||
return $part;
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user