Skip to content
Snippets Groups Projects
Commit ea253541 authored by Yege1893's avatar Yege1893
Browse files

final

parent a0887097
No related branches found
No related tags found
1 merge request!4Master
...@@ -74,7 +74,9 @@ func CancelOrder(w http.ResponseWriter, r *http.Request) { ...@@ -74,7 +74,9 @@ func CancelOrder(w http.ResponseWriter, r *http.Request) {
http.Error(w, err.Error(), http.StatusInternalServerError) http.Error(w, err.Error(), http.StatusInternalServerError)
} }
if order.User != *internalUser { if order.User != *internalUser {
http.Error(w, "can not cancel order with this user", http.StatusInternalServerError)
sendJson(w, "user is not allowed to cancel this order") sendJson(w, "user is not allowed to cancel this order")
return
} }
err = service.CancelOrder(id, order) err = service.CancelOrder(id, order)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment