Ejemplo n.º 1
0
        public async Task <IActionResult> CallbackAsync(string code)
        {
            if (string.IsNullOrEmpty(code))
            {
                return(BadRequest(new { message = "Url param 'code' not provided" }));
            }

            bool result = await _httpRequestService.DoExchangeAsync(code);

            if (!result)
            {
                return(BadRequest(new { message = "Error trying to exchange code" }));
            }

            return(Ok(new { message = "OK" }));
        }