Parcourir la source

add owner_info

visuddhinanda il y a 2 ans
Parent
commit
bc7f2216b5
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      app/Http/Controllers/ChannelController.php

+ 3 - 1
app/Http/Controllers/ChannelController.php

@@ -478,7 +478,9 @@ class ChannelController extends Controller
         //
         //
         $indexCol = ['uid','name','summary','type','owner_uid','lang','status','updated_at','created_at'];
         $indexCol = ['uid','name','summary','type','owner_uid','lang','status','updated_at','created_at'];
 		$channel = Channel::where("uid",$id)->select($indexCol)->first();
 		$channel = Channel::where("uid",$id)->select($indexCol)->first();
-        $channel->studio = StudioApi::getById($channel->owner_uid);
+        $studio = StudioApi::getById($channel->owner_uid);
+        $channel->studio = $studio;
+        $channel->owner_info = ['nickname'=>$studio['nickName'],'username'=>$studio['realName']];
 		return $this->ok($channel);
 		return $this->ok($channel);
     }
     }