public IActionResult PushRemoteCommand([FromBody] ReceivedCommand command)
 {
     if (command != null && command.Token == appSettings.SmartHomeServerAccessToken)
     {
         senderHelper.PushRemoteCommand(command, this);
         return(new NoContentResult());
     }
     return(HttpBadRequest());
 }
Exemplo n.º 2
0
        private string SendCommand(AmazonRequest request, ref AmazonResponse response)
        {
            ReceivedCommand command = ConvertRequestToCommand(request, ref response);
            string          str     = null;

            if (command != null)
            {
                str = senderHelper.PushRemoteCommand(command, null);
            }
            return(str);
        }