fix(Core): fix bug is lock
This commit is contained in:
@@ -83,13 +83,14 @@ class FolderController extends Controller
|
||||
} else {
|
||||
$shortText = $text;
|
||||
}
|
||||
|
||||
$isLocked = !auth()->user()->isSubscriber() && (bool) $art->law?->is_locked;
|
||||
|
||||
return [
|
||||
'id' => $art->id,
|
||||
'title' => $art->title,
|
||||
'text' => $shortText,
|
||||
'text' => $isLocked ? null : $shortText,
|
||||
'number' => $art->number,
|
||||
'is_locked' => auth()->user()->isSubscriber() !== false ? false : Law::where('is_locked', $art->law->id)->first()?->is_locked,
|
||||
'is_locked' => $isLocked,
|
||||
'chapter' => $art->chapter != null ? [
|
||||
'id' => $art->chapter->id,
|
||||
'title' => $art->chapter->title,
|
||||
|
||||
Reference in New Issue
Block a user