-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from decole/bugfix/updates
fix card updates
- Loading branch information
Showing
7 changed files
with
125 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Planka\Bridge\Actions\Card; | ||
|
||
use Planka\Bridge\Contracts\Actions\ResponseResultInterface; | ||
use Planka\Bridge\Contracts\Actions\AuthenticateInterface; | ||
use Planka\Bridge\Contracts\Actions\ActionInterface; | ||
use Planka\Bridge\Traits\AuthenticateTrait; | ||
use Planka\Bridge\Traits\CardHydrateTrait; | ||
use Planka\Bridge\Views\Dto\Card\CardDto; | ||
|
||
final class CardClearDueDateAction implements ActionInterface, AuthenticateInterface, ResponseResultInterface | ||
{ | ||
use AuthenticateTrait, CardHydrateTrait; | ||
|
||
public function __construct(private readonly CardDto $card, string $token) | ||
{ | ||
$this->setToken($token); | ||
} | ||
|
||
public function url(): string | ||
{ | ||
return "api/cards/{$this->card->id}"; | ||
} | ||
|
||
public function getOptions(): array | ||
{ | ||
return [ | ||
'json' => [ | ||
'stopwatch' => null, | ||
], | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Planka\Bridge\Actions\Card; | ||
|
||
use Planka\Bridge\Contracts\Actions\ResponseResultInterface; | ||
use Planka\Bridge\Contracts\Actions\AuthenticateInterface; | ||
use Planka\Bridge\Contracts\Actions\ActionInterface; | ||
use Planka\Bridge\Traits\AuthenticateTrait; | ||
use Planka\Bridge\Traits\CardHydrateTrait; | ||
use Planka\Bridge\Views\Dto\Card\CardDto; | ||
|
||
final class CardMoveAction implements ActionInterface, AuthenticateInterface, ResponseResultInterface | ||
{ | ||
use AuthenticateTrait, CardHydrateTrait; | ||
|
||
public function __construct(private readonly CardDto $card, string $token) | ||
{ | ||
$this->setToken($token); | ||
} | ||
|
||
public function url(): string | ||
{ | ||
return "api/cards/{$this->card->id}"; | ||
} | ||
|
||
public function getOptions(): array | ||
{ | ||
return [ | ||
'json' => [ | ||
'listId' => $this->card->listId, | ||
'boardId' => $this->card->boardId, | ||
'position' => $this->card->position, | ||
], | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters