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"]);