diff --git a/src/DigitalData.UserManager.API/Controllers/UserRepController.cs b/src/DigitalData.UserManager.API/Controllers/UserRepController.cs index b9eb082..1d46fd2 100644 --- a/src/DigitalData.UserManager.API/Controllers/UserRepController.cs +++ b/src/DigitalData.UserManager.API/Controllers/UserRepController.cs @@ -20,23 +20,15 @@ public class UserRepController : BaseAuthController GetAll(bool withUser = false, bool withRepGroup = false, bool withGroup = false, bool withRepUser = false, int? userId = null, int? groupId = null) { - try + return await _service.ReadAllAsync(withUser: withUser, withRepGroup: withRepGroup, withGroup: withGroup, withRepUser: withRepUser, + userId: userId, groupId: groupId).ThenAsync(Ok, IActionResult (m, n) => { - return await _service.ReadAllAsync(withUser: withUser, withRepGroup: withRepGroup, withGroup: withGroup, withRepUser: withRepUser, - userId: userId, groupId: groupId).ThenAsync(Ok, IActionResult (m, n) => - { - _logger.LogNotice(n); - return NotFound(); - }); - } - catch (Exception ex) - { - _logger.LogError(ex, "{Message}", ex.Message); - return StatusCode(StatusCodes.Status500InternalServerError); - } + _logger.LogNotice(n); + return NotFound(); + }); } } \ No newline at end of file