Browse Source

return $this->warning => error

visuddhinanda 7 months ago
parent
commit
ff8c7b36b4
1 changed files with 2 additions and 1 deletions
  1. 2 1
      api-v8/app/Http/Controllers/CollectionController.php

+ 2 - 1
api-v8/app/Http/Controllers/CollectionController.php

@@ -201,7 +201,8 @@ class CollectionController extends Controller
     {
     {
         $result  = Collection::where('uid', $id)->first();
         $result  = Collection::where('uid', $id)->first();
         if (!$result) {
         if (!$result) {
-            return $this->warning("没有查询到数据 id={$id}");
+            Log::warning("没有查询到数据 id={$id}");
+            return $this->error("没有查询到数据 id={$id}");
         }
         }
         if ($result->status < 30) {
         if ($result->status < 30) {
             //私有文章,判断权限
             //私有文章,判断权限