Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: duplicated post annotation #37

Merged
merged 1 commit into from
May 17, 2024

Conversation

luuh-oliveira
Copy link
Contributor

@luuh-oliveira luuh-oliveira commented May 17, 2024

Objetivo

Correção urgente de anotação PostMapping duplicada no endpoint de criação de posts

Implementação

Remoção de anotação duplicada


🚀 This description was created by Ellipsis for commit d3e657e

Summary:

This PR removes a duplicated @PostMapping annotation in the createPost method of the PostController class to prevent potential runtime errors.

Key points:

  • Removed duplicated @PostMapping annotation in createPost method of PostController.

Generated with ❤️ by ellipsis.dev

@luuh-oliveira luuh-oliveira merged commit 56ed351 into main May 17, 2024
1 check passed
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to d3e657e in 1 minute and 28 seconds

More details
  • Looked at 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_pPPU08NREIVotRY7


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

4 days left in your free trial, upgrade for $20/seat/month or contact us.

@@ -22,7 +22,6 @@ public class PostController {
private PostService postService;

@Secured("ROLE_TEACHER")
@PostMapping
@Operation(summary = "Cria um post")
@PostMapping
public ResponseEntity<Post> createPost(@RequestBody @Valid PostDTO post, @PathVariable String id){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @PathVariable String id in the createPost method signature is not defined in the @PostMapping path. This could lead to runtime errors. Consider adding a path variable in the @PostMapping annotation if 'id' is required, or remove it if not needed.

@luuh-oliveira luuh-oliveira deleted the fix/incorrectEndpointAnnotation branch May 17, 2024 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant