You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MessageController.cs 629B

123456789101112131415161718192021
  1. using Diligent.WebAPI.Business.Services;
  2. using Diligent.WebAPI.Data.Entities;
  3. using Diligent.WebAPI.Host.Mediator.Messages.Commands;
  4. using MediatR;
  5. using Microsoft.AspNetCore.Mvc;
  6. namespace Diligent.WebAPI.Host.Controllers
  7. {
  8. public class MessageController:ControllerBase
  9. {
  10. private readonly RoomService _roomService;
  11. public MessageController(RoomService roomService)
  12. {
  13. _roomService = roomService;
  14. }
  15. [HttpGet]
  16. public async Task<List<Message>> GetAllMessagesForRoom(string roomId) =>
  17. await _roomService.GetMessagesForSpecificRoom(roomId);
  18. }
  19. }