Returning high or low string from pin-value endpoint.
This commit is contained in:
parent
f469f012f8
commit
97dc1dbaa7
|
|
@ -16,10 +16,10 @@ namespace Proculite.GpioRest.Controllers
|
|||
[HttpGet("pin-value/{pinNumber}")]
|
||||
public IActionResult PinValue(int pinNumber)
|
||||
{
|
||||
if(!ModelState.IsValid)
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest();
|
||||
|
||||
return Ok(_gpioService.CurrentPinValue(pinNumber));
|
||||
|
||||
return Ok(_gpioService.CurrentPinValue(pinNumber).ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue