feat: Gruppen- und Modultabellen zur Benutzerseite hinzugefügt; Frontend- und Backend-APIs aktualisiert, um Gruppen basierend auf der Benutzerauswahl zu filtern

This commit is contained in:
Developer 02
2024-07-25 11:00:42 +02:00
parent 21d7507726
commit 19ba6f0da9
10 changed files with 92 additions and 12 deletions

View File

@@ -37,10 +37,17 @@ namespace DigitalData.UserManager.API.Controllers
public override Task<IActionResult> GetAll() => base.GetAll();
[HttpGet]
public async Task<IActionResult> GetAll([FromQuery]bool withUser = false, [FromQuery]bool withGroup = false)
public async Task<IActionResult> GetAll([FromQuery]bool withUser = false, [FromQuery]bool withGroup = false, [FromQuery] string? username = null)
{
try
{
if (username is not null)
return await _service.ReadByUsernameAsync(username).ThenAsync(Ok, IActionResult (m, n) =>
{
_logger.LogNotice(n);
return NotFound();
});
return await _service.ReadAllAsyncWith(withUser, withGroup).ThenAsync(Ok, IActionResult (m, n) =>
{
_logger.LogNotice(n);