| 12345678910111213141516171819202122232425 |
- using Microsoft.AspNetCore.Mvc;
-
- namespace Diligent.WebAPI.Host.Controllers.V1
- {
- [ApiVersion("1.0")]
- [Route("v{version:apiVersion}/import")]
- [ApiController]
- public class ImportController : ControllerBase
- {
- private readonly IImportService _service;
- private readonly IApplicantService _applicantService;
- public ImportController(IImportService service, IApplicantService applicantService)
- {
- _service = service;
- _applicantService = applicantService;
- }
- [HttpPost]
- public async Task<ActionResult> Import(IFormFile file)
- {
- var applicants = await _service.Import(file);
- await _applicantService.ImportApplicant(applicants);
- return Ok();
- }
- }
- }
|