visuddhinanda 2 лет назад
Родитель
Сommit
90a3ddbd3d
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      app/Http/Api/ChannelApi.php

+ 4 - 0
app/Http/Api/ChannelApi.php

@@ -1,9 +1,13 @@
 <?php
 namespace App\Http\Api;
 use App\Models\Channel;
+use Illuminate\Support\Str;
 
 class ChannelApi{
     public static function getById($id){
+        if(!Str::isUuid($id)){
+            return false;
+        }
         $channel = Channel::where("uid",$id)->first();
         if($channel){
             return [