Skip to content

Commit

Permalink
🐛 Read comments from private posts
Browse files Browse the repository at this point in the history
  • Loading branch information
MarceauKa committed Nov 25, 2019
1 parent 1e2b1f0 commit df8c229
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/CommentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct()

public function get(Request $request, int $id)
{
$post = Post::withPrivate($request)
$post = Post::withPrivate($request->user('api'))
->findOrFail($id);

$comments = Comment::postIs($id)
Expand Down
2 changes: 1 addition & 1 deletion app/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

/**
* @method Builder|Post pinnedFirst()
* @method Builder|Post withPrivate(bool|User|Request $private)
* @method Builder|Post withPrivate(User|Request $private)
* @method Builder|Post withoutChests()
*/
class Post extends Model
Expand Down

0 comments on commit df8c229

Please sign in to comment.