diff --git a/app/Services/TG/Hook/Mod/Test.php b/app/Services/TG/Hook/Mod/Test.php index e5f550e..239bec2 100644 --- a/app/Services/TG/Hook/Mod/Test.php +++ b/app/Services/TG/Hook/Mod/Test.php @@ -49,4 +49,48 @@ class Test extends Base { } + public function cronV2($aParam) + { + + if (($aParam["aArg"][1] ?? false) == "?") { + return "#cron__{type:id,i_in10,rand}__{bSendTg:y,n-default}__{bPull:y,n-defulat}"; + } + + $sTimeType = $aParam["aOption"][1]; + $sValue = $aParam["aArg"][1]; +// $sIsText = $aParam["aOption"][2] ?? "yes"; + $sSendTg = $aParam["aOption"][2] ?? "n"; + $sPull = $aParam["aOption"][3] ?? "n"; + + + +// if ($sSendTg == "yes") { +// $bSendTg = true; +// } else if ($sSendTg == "no") { +// $bSendTg = false; +// } + +// if ($sIsText == "yes") { +// $is_test = true; +// } else if ($sIsText == "no") { +// $is_test = false; +// } + + $this->oHttp->sMethod = "get"; + $this->oHttp->sToUrl = env("APP_URL")."/cronv2"; + $this->oHttp->bIsJson = true; + $this->oHttp->aData = [ + "is_test" => true, + "time_type" => $sTimeType, + "v" => $sValue, + "sSendTg" => $sSendTg, + "sPull" => $sPull + ]; + + $r = $this->oHttp->send(); + + return $r; + + } + }