User dolgok javítása

This commit is contained in:
2025-03-15 14:27:08 +01:00
parent 2d13b0909e
commit 8793a1c77c
4 changed files with 89 additions and 5 deletions
@@ -24,7 +24,7 @@ namespace WorkFlowCheck.API.Controllers
{
IsSuccess = true,
};
var userDTO = await _userService.GetUser(id);
var userDTO = await _userService.GetUserAsync(id);
if (userDTO != null)
{
@@ -49,7 +49,30 @@ namespace WorkFlowCheck.API.Controllers
return retVal;
}
[HttpPost("authenticate")]
[HttpGet("GetAllUser")]
public async Task<ApiResponseDTO<List<UserDTO>>> GetAllUser()
{
var retVal = new ApiResponseDTO<List<UserDTO>>()
{
IsSuccess = true,
};
var userDTO = await _userService.GetAllUserAsync();
if (userDTO != null)
{
retVal.IsSuccess = true;
retVal.Data = userDTO;
}
else
{
retVal.IsSuccess = false;
retVal.Errors.Add("No data!");
}
return retVal;
}
[HttpPost("Authenticate")]
public async Task<ApiResponseDTO<UserDTO>> Authenticate([FromBody] UserDTO userDTO)
{
var retVal = new ApiResponseDTO<UserDTO>()