From ea2535411f94f330deb92135499dee544792ab85 Mon Sep 17 00:00:00 2001 From: Yege1893 <yannick.ege@web.de> Date: Tue, 11 Jul 2023 11:56:33 +0200 Subject: [PATCH] final --- src/highlanderticketing/handler/order.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/highlanderticketing/handler/order.go b/src/highlanderticketing/handler/order.go index 495df57..a5868ee 100644 --- a/src/highlanderticketing/handler/order.go +++ b/src/highlanderticketing/handler/order.go @@ -74,7 +74,9 @@ func CancelOrder(w http.ResponseWriter, r *http.Request) { http.Error(w, err.Error(), http.StatusInternalServerError) } 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") + return } err = service.CancelOrder(id, order) -- GitLab