Skip to content

Commit

Permalink
feature: CRUD posts API endpoints - correct create method
Browse files Browse the repository at this point in the history
Task: 86972yq1k
  • Loading branch information
KinTrae committed Dec 21, 2024
1 parent a4a4e7d commit 2790d3c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public Page<PostDto> getPostsForUser(String login, String requestedBy, int pageN
}

@Override
public PostDto createPost(String content, String login) {
public PostDto createPost(String login, String content) {
User postOwner = userRepository.findByLogin(login)
.orElseThrow(() -> new UsernameNotFoundException(String.format("User: '%s' not found", login)));
Post post = new Post();
Expand Down

0 comments on commit 2790d3c

Please sign in to comment.