public async Task UpdateSensorTest() { IHueRequest request = new UpdateSensorRequest(2, "Schalter Schlafzimmer"); var response = await _client.GetResponseAsync(request); Assert.True(response is SuccessResponse); OnLog(response); }
public async Task <IActionResult> Put([FromBody] UpdateSensorRequest request, Guid id) { if (OrganisationId == Guid.Empty) { return(Forbid()); } var sensorDto = _mapper.Map <SensorDto>(request); sensorDto.Id = id; sensorDto.OrganisationId = OrganisationId; await _sensorService.UpdateAsync(sensorDto); return(NoContent()); }