| 123456789101112131415161718192021 |
- using Diligent.WebAPI.Business.Services;
- using Diligent.WebAPI.Data.Entities;
- using Diligent.WebAPI.Host.Mediator.Messages.Commands;
- using MediatR;
- using Microsoft.AspNetCore.Mvc;
-
- namespace Diligent.WebAPI.Host.Controllers
- {
- public class MessageController:ControllerBase
- {
- private readonly RoomService _roomService;
-
- public MessageController(RoomService roomService)
- {
- _roomService = roomService;
- }
- [HttpGet]
- public async Task<List<Message>> GetAllMessagesForRoom(string roomId) =>
- await _roomService.GetMessagesForSpecificRoom(roomId);
- }
- }
|