17 lines
584 B
C#
17 lines
584 B
C#
using MediatR;
|
|
using Modules.User.Application.Gateways;
|
|
|
|
namespace Modules.User.Application.Queries;
|
|
|
|
public class GetAccountSessionsQuery : IRequest<List<Models.Session>>
|
|
{
|
|
public Guid AccountId { get; set; } = default!;
|
|
}
|
|
|
|
public class GetAccountSessionsQueryHandler(IAccountGateway accountGateway) : IRequestHandler<GetAccountSessionsQuery, List<Models.Session>>
|
|
{
|
|
public async Task<List<Models.Session>> Handle(GetAccountSessionsQuery request, CancellationToken cancellationToken)
|
|
{
|
|
return await accountGateway.GetAccountSessions(request.AccountId);
|
|
}
|
|
} |