Cleaned up using in project. Improved prohect structure and refactored page names. Upgraded dependencies

This commit is contained in:
2026-03-13 08:53:04 +01:00
parent 1257e8b950
commit 6d1e6e1690
37 changed files with 265 additions and 254 deletions

View File

@@ -12,10 +12,11 @@ namespace Moonlight.Api.Admin.Users.Users;
public class UserAuthService
{
public const string CacheKeyPattern = $"Moonlight.{nameof(UserAuthService)}.{nameof(ValidateAsync)}-{{0}}";
private const string UserIdClaim = "UserId";
private const string IssuedAtClaim = "IssuedAt";
public const string CacheKeyPattern = $"Moonlight.{nameof(UserAuthService)}.{nameof(ValidateAsync)}-{{0}}";
private readonly IEnumerable<IUserAuthHook> Hooks;
private readonly HybridCache HybridCache;
private readonly ILogger<UserAuthService> Logger;

View File

@@ -34,6 +34,7 @@ public class UserDeletionController : Controller
var validationResult = await UserDeletionService.ValidateAsync(id);
if (!validationResult.IsValid)
{
return ValidationProblem(
new ValidationProblemDetails(
new Dictionary<string, string[]>
@@ -45,6 +46,7 @@ public class UserDeletionController : Controller
}
)
);
}
await UserDeletionService.DeleteAsync(id);
return NoContent();

View File

@@ -43,7 +43,9 @@ public class UsersController : Controller
// Filters
if (filterOptions != null)
{
foreach (var filterOption in filterOptions.Filters)
{
query = filterOption.Key switch
{
nameof(Infrastructure.Database.Entities.User.Email) =>
@@ -54,6 +56,8 @@ public class UsersController : Controller
_ => query
};
}
}
// Pagination
var data = await query