Class VolunteerRolesController
- Namespace
- Builvero.Api.Controllers
- Assembly
- Builvero.Api.dll
Provides public API endpoints for retrieving active volunteer roles (no authentication required).
[ApiController]
[Route("api/volunteer-roles")]
public class VolunteerRolesController : ControllerBase
- Inheritance
-
VolunteerRolesController
- Inherited Members
Remarks
This is a public controller - no authentication is required. It provides:
- Retrieving all active volunteer roles available for application
Only active volunteer roles are returned. Inactive roles are hidden from public view. This controller is used by the public volunteer application form to display available positions.
Constructors
VolunteerRolesController(IVolunteerRoleService)
Initializes a new instance of the VolunteerRolesController class.
public VolunteerRolesController(IVolunteerRoleService roleService)
Parameters
roleServiceIVolunteerRoleServiceService for volunteer role operations.
Methods
GetActiveRoles(CancellationToken)
Retrieves all active volunteer roles available for application.
[HttpGet]
public Task<ActionResult<List<VolunteerRoleDto>>> GetActiveRoles(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenCancellation token to cancel the operation.
Returns
- Task<ActionResult<List<VolunteerRoleDto>>>
200 OK: Returns list of VolunteerRoleDto objects for active roles only
500 Internal Server Error: Error retrieving volunteer roles
Remarks
Public endpoint (no authentication required). Returns only volunteer roles where IsActive is true. Inactive roles are excluded from the results. Used by the public volunteer application form to display available positions that users can apply for.