Example #1
0
        public async Task <IActionResult> GetLocalizacaoByCep(string cep)
        {
            try
            {
                var result = await _cepService.GetLocalizacaoByCep(cep);

                if (result == null)
                {
                    return(NotFound());
                }

                return(Ok(result));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }