User dolgok javítása
This commit is contained in:
@@ -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>()
|
||||
|
||||
Reference in New Issue
Block a user