Esempio n. 1
0
        public async Task Set(JeepeeControlDTO dto)
        {
            // only act on the request if the allowed connection is making it
            if (Context.ConnectionId == ConnectionTracker.ConnectedUser)
            {
                await _mediator.Send(new UpdateChannel(dto.Channel, dto.Direction, dto.On));

                await Clients.All.SendAsync("Set", dto);
            }
        }
Esempio n. 2
0
 public IActionResult Set(JeepeeControlDTO dto)
 {
     _mediator.Send(new UpdateChannel(dto.Channel, dto.Direction, dto.On));
     return(Ok());
 }