Added get uses endpoint
This commit is contained in:
@@ -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<ApplicationDbContext> 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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user