Created one part of all endpoints to admin the user

This commit is contained in:
2026-02-21 18:32:32 +01:00
parent ac515b8d61
commit e0a4e88eca
21 changed files with 340 additions and 0 deletions
@@ -0,0 +1,13 @@
using Ardalis.Specification;
using BeReadyBackend.Models;
namespace BeReadyBackend.Specifications.Users;
public class GetUserByCriteriaSpec : SingleResultSpecification<User>
{
public GetUserByCriteriaSpec(string username, string email, int? id)
{
Query
.Where(x => (x.Username == username || x.Email == email) && x.Id != id);
}
}
@@ -0,0 +1,13 @@
using Ardalis.Specification;
using BeReadyBackend.Models;
namespace BeReadyBackend.Specifications.Users;
public class GetUsersByScoreSpec : Specification<User>
{
public GetUsersByScoreSpec()
{
Query
.OrderByDescending(x => x.Score);
}
}