feat: add MemberController REST API endpoints (Closes #22) #71

Merged
shahondin1624 merged 1 commits from feature/issue-22-create-membercontroller-api-endpoints into main 2026-04-07 11:41:37 +02:00
Owner

Summary

  • Creates MemberController extending ApiController with full REST API for member CRUD
  • Adds sub-entity endpoints for addresses, phones, and emails (create, update, delete)
  • Registers all 17 API routes in appinfo/routes.php
  • Proper HTTP status codes: 201 (created), 400 (validation), 404 (not found), 409 (duplicate), 500 (server error)
  • CSRF protection on state-changing endpoints, NoCSRFRequired on GET endpoints

Endpoints

  • GET/POST /api/v1/members, GET/PUT/DELETE /api/v1/members/{id}
  • POST/PUT/DELETE /api/v1/members/{memberId}/addresses/{addrId}
  • POST/PUT/DELETE /api/v1/members/{memberId}/phones/{phoneId}
  • POST/PUT/DELETE /api/v1/members/{memberId}/emails/{emailId}

Closes #22

## Summary - Creates `MemberController` extending `ApiController` with full REST API for member CRUD - Adds sub-entity endpoints for addresses, phones, and emails (create, update, delete) - Registers all 17 API routes in `appinfo/routes.php` - Proper HTTP status codes: 201 (created), 400 (validation), 404 (not found), 409 (duplicate), 500 (server error) - CSRF protection on state-changing endpoints, NoCSRFRequired on GET endpoints ## Endpoints - `GET/POST /api/v1/members`, `GET/PUT/DELETE /api/v1/members/{id}` - `POST/PUT/DELETE /api/v1/members/{memberId}/addresses/{addrId}` - `POST/PUT/DELETE /api/v1/members/{memberId}/phones/{phoneId}` - `POST/PUT/DELETE /api/v1/members/{memberId}/emails/{emailId}` Closes #22
shahondin1624 added 1 commit 2026-04-07 11:41:32 +02:00
Create MemberController with full REST API for member CRUD operations
and sub-entity management (addresses, phones, emails). Register all
17 API routes in routes.php. Endpoints use proper HTTP status codes,
CSRF protection, and delegate validation to MemberService.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
shahondin1624 merged commit 17bdf7e54a into main 2026-04-07 11:41:37 +02:00
shahondin1624 deleted branch feature/issue-22-create-membercontroller-api-endpoints 2026-04-07 11:41:38 +02:00
Sign in to join this conversation.