. */ namespace SP\Modules\Web\Controllers\AccountFavorite; use SP\Domain\Common\Attributes\Action; use SP\Domain\Common\Dtos\ActionResponse; use SP\Domain\Common\Enums\ResponseType; use SP\Domain\Core\Exceptions\SPException; use function SP\__u; /** * Class MarkController * * @package SP\Modules\Web\Controllers */ final class MarkController extends AccountFavoriteBase { /** * @param int $accountId * * @return ActionResponse * @throws SPException */ #[Action(ResponseType::JSON)] public function markAction(int $accountId): ActionResponse { $this->accountToFavoriteService->add($accountId, $this->session->getUserData()->id); return ActionResponse::ok(__u('Favorite added')); } }