From 6a91ea96a353b5d90ff023f94ee2a1611f7ad757 Mon Sep 17 00:00:00 2001 From: hellcat Date: Wed, 29 Jul 2026 17:52:32 +0800 Subject: [PATCH] no message --- app/Http/Controllers/Api/v1/ArticlesController.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Api/v1/ArticlesController.php b/app/Http/Controllers/Api/v1/ArticlesController.php index 817f2b0d..f37e7a67 100755 --- a/app/Http/Controllers/Api/v1/ArticlesController.php +++ b/app/Http/Controllers/Api/v1/ArticlesController.php @@ -108,16 +108,17 @@ public function receiveShadowrocketids(Request $oRequest) $sTitleSub = $aData["title_sub"] ?? ''; $aArticleTags = $aData["tags"] ?? []; $sSlug = 'ssi'.date("Ymd"); - $sImgAuthor = "tg_xiuren_a"; +// $sImgAuthor = "tg_xiuren_a"; + $sSubKey = $_ENV['site_code_short'].'::ssi'; $i7like = $aData["7like"] ?? 0; - $oThumbNum = ArticleThumbNum::firstOrCreate(["author_code" => $sImgAuthor, "type" => "shadowrocketids"]); + $oThumbNum = ArticleThumbNum::firstOrCreate(["author_code" => $sSubKey, "type" => "shadowrocketids"]); $iThumbNum = $oThumbNum->num; - $sImagesApi = "https://".config("path.url_resource_base")."/api/images/get/url-by-num"; + $sImagesApi = "https://".config("path.url_resource_base")."/api/images/get/url-by-subkey"; $aApiArg = [ - "sAuthorCode" => $sImgAuthor, + "sSubKey" => $sSubKey, "iNum" => $iThumbNum+1, ]; $sApiResult = HttpV2::make($sImagesApi, "post")->withToken()->setDataA($aApiArg)->send(); @@ -149,7 +150,7 @@ public function receiveShadowrocketids(Request $oRequest) (new TagService())->syncArticleTagsByName($oArticle, $aArticleTags); - ArticleThumbNum::where("author_code", $sImgAuthor)->where("type", "shadowrocketids")->update(["num" => $sThumbNumTrue]); + ArticleThumbNum::where("author_code", $sSubKey)->where("type", "shadowrocketids")->update(["num" => $sThumbNumTrue]); $sArticleUrl = config("app.url")."/shadowrocketids/".$sSlug;