allow to get report. security problem on controller

This commit is contained in:
Kham
2025-11-10 13:28:42 +11:00
parent f693e70d10
commit 6344546157
+2 -1
View File
@@ -67,7 +67,7 @@ namespace CarParkValidationAPI.Controllers
var users = await _userService.GetAllUsers(); var users = await _userService.GetAllUsers();
return Ok(users); return Ok(users);
} }
[AllowAnonymous]
[HttpGet("{id:int}")] [HttpGet("{id:int}")]
public async Task<IActionResult> GetById(int id) public async Task<IActionResult> GetById(int id)
{ {
@@ -80,6 +80,7 @@ namespace CarParkValidationAPI.Controllers
return Ok(user); return Ok(user);
} }
/* download the excel file */ /* download the excel file */
[AllowAnonymous]
[HttpGet("[action]")] [HttpGet("[action]")]
public async Task<IActionResult> GetReportFile() public async Task<IActionResult> GetReportFile()
{ {