//[Route("api/test")] public NegotiatedContentResult <GetDriverOrderListResponse> GetDriverOrderListTest() { //OrderDao dao = new OrderDao(); var identity = (ClaimsIdentity)User.Identity; var userId = identity.Claims .FirstOrDefault(c => c.Type == "ID").Value; var accTocken = identity.Claims .FirstOrDefault(c => c.Type == "AccToken").Value; var Roles = identity.Claims .Where(c => c.Type == ClaimTypes.Role) .Select(c => c.Value).ToArray(); //var custOrderList = dao.GetOrderList(int.Parse(ID), 1); //return Request.CreateResponse(HttpStatusCode.OK, custOrderList); GetDriverOrderListRequest ordReq = new GetDriverOrderListRequest(); ordReq.user_id = int.Parse(userId); ordReq.auth_token = accTocken; ordReq.current_list = 1; GetDriverOrderListResponse resp = _ordersServices.GetDriverOrderList(ordReq); return(Content(HttpStatusCode.OK, resp)); }
public NegotiatedContentResult <GetDriverOrderListResponse> PostGetDriverOrderList([FromBody] GetDriverOrderListRequest request) { GetDriverOrderListResponse resp = _ordersServices.GetDriverOrderList(request); return(Content(HttpStatusCode.OK, resp)); }