You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SelectionProcessesController.cs 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using Diligent.WebAPI.Contracts.DTOs.SelectionProcess;
  2. namespace Diligent.WebAPI.Host.Controllers.V1
  3. {
  4. [ApiVersion("1.0")]
  5. [Route("v{version:apiVersion}/selectionprocesses")]
  6. [ApiController]
  7. public class SelectionProcessesController : ControllerBase
  8. {
  9. private readonly ISelectionProcessService _selectionProcessesService;
  10. public SelectionProcessesController(ISelectionProcessService selectionProcessesService)
  11. {
  12. _selectionProcessesService = selectionProcessesService;
  13. }
  14. [Authorize]
  15. [HttpPost]
  16. public async Task<IActionResult> FinishSelectionProcess([FromBody] SelectionProcessCreateDto model) =>
  17. Ok(await _selectionProcessesService.FinishSelectionProcess(model));
  18. [Authorize]
  19. [HttpPost("status-update")]
  20. public async Task<IActionResult> UpdateStatus([FromBody] StatusChangeDTO model)
  21. {
  22. await _selectionProcessesService.StatusUpdate(model);
  23. return Ok("Status updated.");
  24. }
  25. [Authorize]
  26. [HttpPost("interviewer-update")]
  27. public async Task<IActionResult> UpdateInterviewer([FromBody] InterviewerUpdateDTO model)
  28. {
  29. await _selectionProcessesService.InterviewerUpdate(model);
  30. return Ok("Interviewer changed.");
  31. }
  32. }
  33. }