示例#1
0
        public async Task <IActionResult> LocateIp(string ip)
        {
            var localization = await _ipService.GetLocalizationByIpAsync(ip);

            if (localization.Ip == null)
            {
                return(StatusCode(500));
            }
            await _localizationRepository.CreateAsync(localization);

            return(Ok(_mapper.Map <LocalizationModel>(localization)));
        }