diff --git a/app/Services/TG/Hook/Mod/Dog.php b/app/Services/TG/Hook/Mod/Dog.php index 78910a5..c46b722 100644 --- a/app/Services/TG/Hook/Mod/Dog.php +++ b/app/Services/TG/Hook/Mod/Dog.php @@ -16,13 +16,17 @@ class Dog extends Base { $oArticle = ModelArticle::find($iId); // https://api.github.com/repos/v2rayclashfree-com/v2rayclashfree - $this->oHttp->sToUrl = "https://api.github.com/repos/".$oArticle->user_name."/".$oArticle->project_name; + $this->oHttp->sToUrl = "https://api.github.com/repos/".$oArticle->user_name."/".$oArticle->project_name."sdfsdfsdf"; $this->oHttp->sMetHod = "get"; // $this->oHttp->bIsJson = true; $r = $this->oHttp->send(); $aGitHub = json_decode($r, true); + if (!isset($aGitHub["id"])) { + return $this->toJson($aGitHub); + } + $tmp = str_replace("T", " ", rtrim($aGitHub["updated_at"], "Z")); //updated_at, pushed_at $tmp = strtotime($tmp); $tmpDate = date("Y-m-d H:i:s", $tmp + (8 * 3600));