From be5fbdbb5f26650f726f3f09adb27b32d5577e85 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Fri, 21 Aug 2026 13:21:12 +0200 Subject: [PATCH] Added get uses endpoint --- .../Endpoints/Users/GetUsersEndpoint.cs | 26 +++++++++++++++++++ .../Extensions/EndpointTags.cs | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 PostFundManagement.Api/Endpoints/Users/GetUsersEndpoint.cs diff --git a/PostFundManagement.Api/Endpoints/Users/GetUsersEndpoint.cs b/PostFundManagement.Api/Endpoints/Users/GetUsersEndpoint.cs new file mode 100644 index 0000000..7475834 --- /dev/null +++ b/PostFundManagement.Api/Endpoints/Users/GetUsersEndpoint.cs @@ -0,0 +1,26 @@ +using PostFundManagement.Domain.Abstractions; +using PostFundManagement.Domain.Api; +using PostFundManagement.Domain.Extensions; +using PostFundManagement.Infrastructure.Database; + +namespace PostFundManagement.Api.Endpoints.Users; + +[ApiVersionTarget(1)] +public class GetUsersEndpoint : IEndpoint +{ + public void Map(IEndpointRouteBuilder builder) + { + builder.MapGet("api/users", (IDbContextFactory contextFactory) => + { + throw new NotImplementedException(); + }) + .RequireAuthorization() + .WithDescription("Paginated, searchable directory of system users. Supports filtering by ActivityStatus, searching by Email, and sorting") + .WithName(typeof(GetUsersEndpoint).ToEndpointName()) + .MapToApiVersion(new ApiVersion(1)) + .Produces(StatusCodes.Status200OK) + .Produces(StatusCodes.Status400BadRequest) + .Produces(StatusCodes.Status401Unauthorized) + .WithTags(EndpointTags.Users); + } +} \ No newline at end of file diff --git a/PostFundManagement.Domain/Extensions/EndpointTags.cs b/PostFundManagement.Domain/Extensions/EndpointTags.cs index ff74f2c..8329ecf 100644 --- a/PostFundManagement.Domain/Extensions/EndpointTags.cs +++ b/PostFundManagement.Domain/Extensions/EndpointTags.cs @@ -13,4 +13,6 @@ public static class EndpointTags public const string Evidence = "Evidence & M&E"; public const string Communications = nameof(Communications); + + public const string Users = nameof(Users); } \ No newline at end of file