Skip to content

Commit

Permalink
fix: use wantsJson isntead of custom checker
Browse files Browse the repository at this point in the history
  • Loading branch information
alaminfirdows committed Sep 2, 2024
1 parent 090fde4 commit f4c089f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Frontend/BoardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function show(Request $request, Board $board)
'posts' => $posts,
];

if ($request->cursor) {
if ($request->wantsJson()) {
return response()->json($data);
}

Expand Down

0 comments on commit f4c089f

Please sign in to comment.