- Added new apis
This commit is contained in:
@@ -126,6 +126,12 @@ class BylawApiController extends Controller
|
||||
->where('bylaw_document_id', $bylaw->id)
|
||||
->get();
|
||||
|
||||
$formatted['highlight'] = \App\Models\BylawHighlight::select('id', 'start_index', 'end_index', 'selected_text', 'color_code')
|
||||
->where('user_id', auth()->id())
|
||||
->where('bylaw_document_id', $bylaw->id)
|
||||
->get();
|
||||
|
||||
|
||||
if (!$formatted['is_locked']) {
|
||||
$eloquentNodes = BylawNode::with('type')
|
||||
->where('document_id', $bylaw->id)
|
||||
@@ -353,6 +359,11 @@ class BylawApiController extends Controller
|
||||
->where('bylaw_document_id', $item->id)
|
||||
->get();
|
||||
|
||||
$formatted['highlight'] = \App\Models\BylawHighlight::select('id', 'start_index', 'end_index', 'selected_text', 'color_code')
|
||||
->where('user_id', auth()->id())
|
||||
->where('bylaw_document_id', $item->id)
|
||||
->get();
|
||||
|
||||
return $formatted;
|
||||
})->values()->toArray();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user