refactor ValidateExcel method in SalaryAidController to use ValidateExcelRequest model
This commit is contained in:
@@ -82,14 +82,19 @@ public class SalaryAidController:ClientBaseController
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
[HttpPost("validate-excel")]
|
[HttpPost("validate-excel")]
|
||||||
public ActionResult<ExcelValidation<SalaryAidImportData>> ValidateExcel([FromForm]IFormFile excel)
|
public ActionResult<ExcelValidation<SalaryAidImportData>> ValidateExcel([FromForm]ValidateExcelRequest request)
|
||||||
{
|
{
|
||||||
var validation = _salaryAidImportExcel.ReadAndValidateExcel(excel, _workshopId);
|
var validation = _salaryAidImportExcel.ReadAndValidateExcel(request.Excel, _workshopId);
|
||||||
|
|
||||||
return validation;
|
return validation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class ValidateExcelRequest
|
||||||
|
{
|
||||||
|
public IFormFile Excel { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class EditSalaryAidRequest
|
public class EditSalaryAidRequest
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user