public ActionResult <Order> Create(Order order) { var point = _pointService.Get(order.PointNumber); if (point == null) { return(NotFound()); } if (point.Status != true) { return(Forbid()); } if (order.OrderList.Length > 10) { return(BadRequest()); } if (ValidationOrder(order.RecepientPhone, "phone") == false) { return(BadRequest()); } if (ValidationOrder(order.PointNumber, "point") == false) { return(BadRequest()); } _orderService.Create(order); return(CreatedAtRoute("GetOrder", new { id = order.Id.ToString() }, order)); }
public ActionResult getPoint(string id) { PointAccount Point = _pointService.Get(id); if (Point != null) { return(Ok(Point)); } else { return(NotFound("Point account Not Found")); } }
public ActionResult <List <Point> > Get() => _pointService.Get();