using FastEndpoints; using Microsoft.EntityFrameworkCore; using PyroFetes.DTO.User.Response; using PyroFetes.Repositories; namespace PyroFetes.Endpoints.Users; public class GetAllUsersEndpoint(UsersRepository usersRepository) : EndpointWithoutRequest> { public override void Configure() { Get("/users"); AllowAnonymous(); } public override async Task HandleAsync(CancellationToken ct) { await Send.OkAsync(await usersRepository.ProjectToListAsync(ct), ct); } }