update to .NET 6.0
This commit is contained in:
@@ -5,6 +5,7 @@ using CarParkValidationAPI.Models.Users;
|
||||
using CarParkValidationAPI.Interface;
|
||||
using System.Threading.Tasks;
|
||||
using CarParkValidationAPI.Models;
|
||||
using System;
|
||||
|
||||
namespace CarParkValidationAPI.Controllers
|
||||
{
|
||||
@@ -78,5 +79,14 @@ namespace CarParkValidationAPI.Controllers
|
||||
var user = await _userService.GetById(id);
|
||||
return Ok(user);
|
||||
}
|
||||
/* download the excel file */
|
||||
[HttpGet("[action]")]
|
||||
public async Task<IActionResult> GetReportFile()
|
||||
{
|
||||
// this.Response.Headers.Add("Access-Control-Expose-Headers", "Content-Disposition");
|
||||
var result = await _userService.GetAllUserReport(); // .GetReport(fromDate, toDate);
|
||||
string fileContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; //Map(result.Data.FileName);
|
||||
return File(result.Data.Content, fileContentType, result.Data.FileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user