Skip to content

BE-3 Add PATCH /books/:id endpoint for editing book#21

Open
tecnodeveloper wants to merge 2 commits intomainfrom
BE_3_EditBookRecord
Open

BE-3 Add PATCH /books/:id endpoint for editing book#21
tecnodeveloper wants to merge 2 commits intomainfrom
BE_3_EditBookRecord

Conversation

@tecnodeveloper
Copy link
Copy Markdown
Owner

PR Description

  • Implemented book edit functionality
  • Added PUT /books/:id endpoint
  • Created updateBook controller
  • Implemented update logic in service layer using Prisma
  • Added validation for request body using updateBookSchema (partial updates allowed)
  • Validated route parameter id
  • Added error handling:
    • Returns 404 if book does not exist
    • Returns 400 for invalid input (e.g., negative price)
  • Updated authors handling (replaces existing authors if provided)

@tecnodeveloper tecnodeveloper requested a review from recluzegeek May 6, 2026 13:14
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