private JsonResult PutRequest(BaseActuator actuator, string parameter, SetCommandParameterModel data) { Console.WriteLine("Received PUT request with payload:"); Console.WriteLine(JsonConvert.SerializeObject(data)); ModifyData(actuator, parameter, data.Value); return(new JsonResult( new { message = "Parameter set!" } )); }
public ActionResult <string> PutAirCoolerMin(SetCommandParameterModel data) { return(PutRequest(airCooler, "MIN", data)); }
public ActionResult <string> PutWaterPumpMin(SetCommandParameterModel data) { return(PutRequest(waterPump, "MIN", data)); }
public ActionResult <string> PutHumidifierMin(SetCommandParameterModel data) { return(PutRequest(humidifier, "MIN", data)); }
public ActionResult <string> PutAirCoolerOffset(SetCommandParameterModel data) { return(PutRequest(airCooler, "OFFSET", data)); }
public ActionResult <string> PutWaterPumpOffset(SetCommandParameterModel data) { return(PutRequest(waterPump, "OFFSET", data)); }
public ActionResult <string> PutHumidifierOffset(SetCommandParameterModel data) { return(PutRequest(humidifier, "OFFSET", data)); }