Beispiel #1
0
        public IHttpActionResult GetConfirmedByChief(int?page = null)
        {
            try
            {
                var tokenObj = new ParsedTokenHelper().GetParsedToken(Request.Properties);

                const int pageSize   = 10;
                var       pageNumber = page ?? 1;
                var       сonfirmedCreditRequests = _iCreditRequestService.GetConfirmedByChief(tokenObj.UserId, pageNumber, pageSize);
                return(Ok(new GetConfirmedCreditResponse()
                {
                    CreditRequests = Mapper.Map <CustomPagedList <ShortCreditRequest> >(сonfirmedCreditRequests)
                }));
            }
            catch (BankClientException ex)
            {
                return(BadRequest(ex.Message));
            }
            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }
        }