Browse Source

add view=template

visuddhinanda 2 years ago
parent
commit
7110c79515
1 changed files with 5 additions and 1 deletions
  1. 5 1
      app/Http/Controllers/ArticleController.php

+ 5 - 1
app/Http/Controllers/ArticleController.php

@@ -131,8 +131,12 @@ class ArticleController extends Controller
         }
         $table = Article::select($field);
         switch ($request->get('view')) {
+            case 'template':
+                $studioId = StudioApi::getIdByName($request->get('studio_name'));
+                $table = $table->where('owner', $studioId);
+                break;
             case 'studio':
-				# 获取studio内所有channel
+				# 获取studio内所有 article
                 $user = AuthApi::current($request);
                 if(!$user){
                     return $this->error(__('auth.failed'),[],401);