Example #1
0
        public async Task <IActionResult> NearestHospital([FromBody] NearestLocationParam param)
        {
            var result = await _hospitalService.FindNearestHospitalAsync(param.Longitude, param.Latitude, param.Radius,
                                                                         param.PolyClinicIds, param.PageIndex, param.PageSize, param.Clue);

            if (result.Success)
            {
                return(Ok(result.Item));
            }
            else
            {
                return(BadRequest(result.Message));
            }
        }