| 1234567891011121314151617181920212223242526272829303132333435 |
- namespace Diligent.WebAPI.Host.Controllers.V1
- {
- [ApiVersion("1.0")]
- [Route("v{version:apiVersion}/applicants")]
- [ApiController]
- public class ApplicantsController:ControllerBase
- {
- private readonly IApplicantService _applicantService;
-
- public ApplicantsController(IApplicantService applicantService)
- {
- _applicantService = applicantService;
- }
-
- //[Authorize]
- [HttpGet]
- public async Task<IActionResult> GetAll()
- {
- return Ok(await _applicantService.GetAll());
- }
-
- //[Authorize]
- [HttpGet("{id}")]
- public async Task<IActionResult> GetById(int id)
- {
- return Ok(await _applicantService.GetById(id));
- }
-
- [HttpGet("processes/{id}")]
- public async Task<IActionResult> GetProcesses(int id)
- {
- return Ok(await _applicantService.GetApplicantWithSelectionProcessesById(id));
- }
- }
- }
|