|
|
@ -93,7 +93,7 @@ class APITacticController {
|
|
|
|
"main_color" => [],
|
|
|
|
"main_color" => [],
|
|
|
|
"second_color" => [],
|
|
|
|
"second_color" => [],
|
|
|
|
], function (HttpRequest $request) use ($tacticId, $account) {
|
|
|
|
], 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())) {
|
|
|
|
if ($this->teamModel->canShareTacticToTeam($request["id"], $account->getUser()->getEmail())) {
|
|
|
|
return HttpResponse::fromCode(HttpCodes::OK);
|
|
|
|
return HttpResponse::fromCode(HttpCodes::OK);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -144,8 +144,8 @@ class APITacticController {
|
|
|
|
"id" => [],
|
|
|
|
"id" => [],
|
|
|
|
"name" => [],
|
|
|
|
"name" => [],
|
|
|
|
"picture" => [],
|
|
|
|
"picture" => [],
|
|
|
|
"mainColor" => [],
|
|
|
|
"main_color" => [],
|
|
|
|
"secondColor" => [],
|
|
|
|
"second_color" => [],
|
|
|
|
], function (HttpRequest $request) use ($tacticId, $account) {
|
|
|
|
], function (HttpRequest $request) use ($tacticId, $account) {
|
|
|
|
if ($this->teamModel->canShareTacticToTeam($request["id"], $account->getUser()->getEmail())) {
|
|
|
|
if ($this->teamModel->canShareTacticToTeam($request["id"], $account->getUser()->getEmail())) {
|
|
|
|
$this->teamModel->unshareTacticToTeam($tacticId, $request["id"]);
|
|
|
|
$this->teamModel->unshareTacticToTeam($tacticId, $request["id"]);
|
|
|
|