Ejemplo n.º 1
0
        public async Task <IHttpActionResult> DeletePayment(Payment paymentData)
        {
            string tokenValue = "";

            if (Request.Headers.TryGetValues("AuthorizationToken", out IEnumerable <string> tokenValues))
            {
                tokenValue = tokenValues.FirstOrDefault();
            }

            var responseBody = await loanService.DeletePaymentAsync(tokenValue, paymentData);

            if (responseBody == null)
            {
                ;
                return(NotFound());
            }
            return(Ok(responseBody));
        }