Skip to content

Conversation

@brainless
Copy link
Owner

Summary

  • Adds PUT /sections/:id endpoint for updating menu section name and display_order
  • Adds DELETE /sections/:id endpoint for deleting menu sections with cascading delete of items
  • Implements proper authentication and authorization checks
  • Uses database transactions for safe section deletion
  • Follows existing code patterns and error handling

Test plan

  • ✅ Added comprehensive integration tests for new functionality
  • ✅ Tests cover update scenarios (name only, display_order only, both fields)
  • ✅ Tests cover delete scenarios (empty sections, sections with items)
  • ✅ Tests cover authorization checks and error cases
  • ✅ Existing tests still pass
  • ✅ Code passes formatting and linting checks

Closes #49

🤖 Generated with Claude Code

claude added 2 commits August 5, 2025 14:59
- Implement PUT /sections/:id for updating section name and display_order
- Implement DELETE /sections/:id with cascading delete of menu items
- Add proper authentication and authorization checks
- Use database transactions for safe deletion
- Follow existing code patterns and error handling

Addresses #49

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix clippy warnings about uninlined format args
- Fix test warnings about unused variables
- Add SQLx offline query cache

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@brainless brainless merged commit 39ae319 into main Aug 5, 2025
2 of 5 checks passed
@brainless brainless deleted the feature/section-update-delete-endpoints branch August 5, 2025 13:32
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.

Backend: Missing section UPDATE and DELETE endpoints (PUT/DELETE /sections/:id)

3 participants