Aktualisierung der GroupOfUser-, User- und UserRep-Controller. Aktualisieren Sie Agular-Referenzen und entfernen Sie Konsolenprotokolle.
This commit is contained in:
@@ -59,7 +59,11 @@ namespace DigitalData.UserManager.API.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
return Ok(await _service.HasGroup(username, groupname));
|
||||
return await _service.HasGroup(username, groupname).ThenAsync(Ok, (m, n) =>
|
||||
{
|
||||
_logger.LogNotice(n);
|
||||
return StatusCode(StatusCodes.Status500InternalServerError);
|
||||
});
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,6 @@ using DigitalData.UserManager.Application.DTOs.User;
|
||||
using DigitalData.UserManager.Domain.Entities;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Reflection;
|
||||
|
||||
namespace DigitalData.UserManager.API.Controllers
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using DigitalData.Core.API;
|
||||
using DigitalData.Core.DTO;
|
||||
using DigitalData.UserManager.Application.Contracts;
|
||||
using DigitalData.UserManager.Application.DTOs.UserRep;
|
||||
using DigitalData.UserManager.Domain.Entities;
|
||||
@@ -26,14 +27,12 @@ namespace DigitalData.UserManager.API.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = await _service.ReadAllAsync(withUser, withRepGroup, withRightGroup, withRepUser, userId);
|
||||
|
||||
if (result.IsSuccess)
|
||||
return await _service.ReadAllAsync(withUser, withRepGroup, withRightGroup, withRepUser, userId).ThenAsync(Ok, IActionResult (m, n) =>
|
||||
{
|
||||
return Ok(result);
|
||||
}
|
||||
|
||||
return NotFound(result);
|
||||
_logger.LogNotice(n);
|
||||
return NotFound();
|
||||
});
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user