16 lines
342 B
C#
16 lines
342 B
C#
|
using MediatR;
|
|||
|
using Teamified.Api.Teams.Queries.ListTeams;
|
|||
|
|
|||
|
namespace Teamified.Api.Teams.Endpoints
|
|||
|
{
|
|||
|
public class ListTeams
|
|||
|
{
|
|||
|
public static async Task<IResult> Handle(IMediator mediator)
|
|||
|
{
|
|||
|
var teams = await mediator.Send(new ListTeamsQuery());
|
|||
|
|
|||
|
return Results.Ok(teams);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|