This commit is contained in:
commit
0e79a8eb5e
43 changed files with 1282 additions and 0 deletions
13
src/Core/Users/GetUsersEndpoint.cs
Normal file
13
src/Core/Users/GetUsersEndpoint.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using TestWeb.Infra;
|
||||
using TestWeb.Utils;
|
||||
|
||||
namespace TestWeb.Core.Users;
|
||||
|
||||
public static class GetUsersEndpoint
|
||||
{
|
||||
public static async Task<Ok<User[]>> Handle(AppDbContext db, CancellationToken ct)
|
||||
{
|
||||
var results = await db.Users.ToArrayAsync(ct);
|
||||
return TypedResults.Ok(results);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue