public async Task <IActionResult> Heartbeat([FromRoute] string deviceId, [FromBody] Location location) { if (location == null) { return(BadRequest()); } if (!_deviceService.Exists(deviceId)) { return(BadRequest()); } var heartbeat = new Heartbeat() { DeviceId = deviceId, Longitude = location.Long, Lattitue = location.Lat }; await _heartbeatService.AddAsync(heartbeat); // May return information about medicine reminder return(Ok()); }
public void TestExists() { Assert.IsTrue(_service.Exists(_deviceID)); }