Description
Implement the full /api/v1/campaigns route group against the Campaign model: create, list, get by id, update, delete, and status transitions.
Acceptance Criteria
- Only users with role ORGANIZATION (owning the campaign) or ADMIN can create/update/delete.
- PATCH /:id/status only allows valid transitions (e.g. DRAFT -> ACTIVE, ACTIVE -> PAUSED/COMPLETED/CANCELLED) - invalid transitions return 422.
- GET / supports pagination (page, limit) and returns total count.
- raisedAmount is never directly editable via this endpoint - it's derived from confirmed donations (stub logic acceptable if donations aren't implemented yet, but must not accept raisedAmount in the request body).
- Tests cover CRUD, unauthorized access, and invalid status transitions.
- Endpoints documented in openapi.yaml.
Suggested reward: $25-$35
Description
Implement the full /api/v1/campaigns route group against the Campaign model: create, list, get by id, update, delete, and status transitions.
Acceptance Criteria
Suggested reward: $25-$35