using Diligent.WebAPI.Business.Services;
using Diligent.WebAPI.Data.Entities;
using Diligent.WebAPI.Host.Mediator.Rooms.Queries;
using MediatR;

namespace Diligent.WebAPI.Host.Mediator.Chat.Handlers
{
    public class GetRoomsWhichSupportCreatedHandler : IRequestHandler<GetRoomsWhichSupportCreatedQuery, List<Room>>
    {
        private readonly RoomService _roomService;

        public GetRoomsWhichSupportCreatedHandler(RoomService roomService)
        {
            _roomService = roomService;
        }
        public async Task<List<Room>> Handle(GetRoomsWhichSupportCreatedQuery request, CancellationToken cancellationToken) => 
            await _roomService.GetRoomsWhichSupportCreated(request.SupportId);
        
    }
}
