diff --git a/backend/app/Post/UseCases/ListUserPosts/ListUserPosts.php b/backend/app/Post/UseCases/ListUserPosts/ListUserPosts.php new file mode 100644 index 0000000..c0c305e --- /dev/null +++ b/backend/app/Post/UseCases/ListUserPosts/ListUserPosts.php @@ -0,0 +1,28 @@ +userId <= 0) { + throw new BadRequestException('userId must be positive'); + } + + return $this->postRepo->findByUserId($request->userId); + } +} diff --git a/backend/app/Post/UseCases/ListUserPosts/ListUserPostsRequest.php b/backend/app/Post/UseCases/ListUserPosts/ListUserPostsRequest.php new file mode 100644 index 0000000..6a5a6a5 --- /dev/null +++ b/backend/app/Post/UseCases/ListUserPosts/ListUserPostsRequest.php @@ -0,0 +1,10 @@ +