public async Task <IActionResult> RegisterMeasurementAsync(int clientId, [FromBody] RegisterMeasurement measurement) { // TODO: check client exists - if not return NotFound() await _weightService.RegisterMeasurementAsync(clientId, measurement); return(Ok()); }
public async Task RegisterMeasurementAsync(int clientId, RegisterMeasurement measurement) { var measurementEntity = _mapper.Map <MeasurementEntity>(measurement); await _measurementRepository.AddAsync(clientId, measurementEntity); }