Created
February 18, 2020 09:51
-
-
Save bykof/e1055d68bed28ac1e8d173fc066edcfe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (orderController *OrderController) Get(ctx context.Context, req *web.Request) web.Result { | |
orderID, err := req.Query1(orderIDKey) | |
if err != nil { | |
return orderController.responder.ServerError(err) | |
} | |
order, err := orderController.orderService.GetOrder(orderID) | |
if err != nil { | |
return orderController.responder.ServerError(err) | |
} | |
return orderController.responder.Data(GetOrderResponse{ | |
Order: order, | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment