sp-dev-fx-webparts/samples/react-kiota-custom-api-client/TeamifiedApi/Teams/Endpoints/ListTeams.cs

16 lines
342 B
C#
Raw Normal View History

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);
}
}
}