From c383432b643958148792fb551a62f0b0041752ef Mon Sep 17 00:00:00 2001 From: "vivien.dufour" Date: Sun, 4 Feb 2024 14:52:14 +0100 Subject: [PATCH] fix ./verify --- src/Api/Controller/APITacticController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Api/Controller/APITacticController.php b/src/Api/Controller/APITacticController.php index 0b220e5..2a5fc5d 100644 --- a/src/Api/Controller/APITacticController.php +++ b/src/Api/Controller/APITacticController.php @@ -93,7 +93,7 @@ class APITacticController { "main_color" => [], "second_color" => [], ], function (HttpRequest $request) use ($tacticId, $account) { - if ($this->canShareTactic($tacticId, $account)) { + if ($this->canShareTactic($tacticId, $account)->getCode() == HttpCodes::OK) { if ($this->teamModel->canShareTacticToTeam($request["id"], $account->getUser()->getEmail())) { return HttpResponse::fromCode(HttpCodes::OK); } @@ -144,8 +144,8 @@ class APITacticController { "id" => [], "name" => [], "picture" => [], - "mainColor" => [], - "secondColor" => [], + "main_color" => [], + "second_color" => [], ], function (HttpRequest $request) use ($tacticId, $account) { if ($this->teamModel->canShareTacticToTeam($request["id"], $account->getUser()->getEmail())) { $this->teamModel->unshareTacticToTeam($tacticId, $request["id"]);