refactor(GroupController): remove try-catch block

This commit is contained in:
Developer 02 2025-08-05 19:47:56 +02:00
parent 9fd66d41ca
commit d252859b11

View File

@ -17,8 +17,6 @@ public class GroupController : BaseAuthController<IGroupService, GroupCreateDto,
[HttpPost("ByDir")]
public async Task<IActionResult> CreateByDir(DirectoryGroupDto adGroup)
{
try
{
return await _service.CreateAsync(adGroup).ThenAsync(
Success: id =>
@ -34,10 +32,4 @@ public class GroupController : BaseAuthController<IGroupService, GroupCreateDto,
return BadRequest();
});
}
catch (Exception ex)
{
_logger.LogError(ex, "{Message}", ex.Message);
return StatusCode(StatusCodes.Status500InternalServerError);
}
}
}