. */ 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 UnmarkController extends AccountFavoriteBase { /** * @param int $accountId * * @return ActionResponse * @throws SPException */ #[Action(ResponseType::JSON)] public function unmarkAction(int $accountId): ActionResponse { $this->accountToFavoriteService->delete($accountId, $this->session->getUserData()->id); return ActionResponse::ok(__u('Favorite deleted')); } }