b29a268b1d
- Move completed plan files to .plans/done/ - Move 18 open plan files to .plans/open/ - Update .gitignore to exclude .verified_plans temp file - Verified all 18 open plans still describe unimplemented issues
1.2 KiB
1.2 KiB
Plan: Issue #22 - MemberController API endpoints
Summary
Create MemberController with REST API for member CRUD operations including sub-entity management (addresses, phones, emails). All endpoints require Nextcloud authentication and CSRF protection on state-changing endpoints. Update routes.php with all API routes.
Endpoints
- GET /api/v1/members - list (pagination, filters)
- GET /api/v1/members/{id} - get single with sub-entities
- POST /api/v1/members - create
- PUT /api/v1/members/{id} - update
- DELETE /api/v1/members/{id} - soft-delete
- POST /api/v1/members/{id}/addresses - add address
- PUT /api/v1/members/{id}/addresses/{addrId} - update address
- DELETE /api/v1/members/{id}/addresses/{addrId} - delete address
- Same pattern for phones and emails
Steps
- Create
lib/Controller/MemberController.php - Update
appinfo/routes.phpwith all API routes
AC Checklist
- MemberController exists with proper DI
- All CRUD endpoints implemented
- Sub-entity endpoints for addresses, phones, emails
- Routes registered in routes.php
- Proper HTTP status codes (200, 201, 400, 404, 409, 500)
- CSRF protection annotations correct
- Input validation via MemberService