2
0
Эх сурвалжийг харах

:bug: add where('is_current',true)

visuddhinanda 1 жил өмнө
parent
commit
8e93829642

+ 2 - 1
app/Http/Api/CourseApi.php

@@ -22,7 +22,8 @@ class CourseApi{
 
     public static function role($courseId,$userUid){
         $role = CourseMember::where('course_id',$courseId)
-                            ->where('user_id')
+                            ->where('user_id',$userUid)
+                            ->where('is_current',true)
                             ->value('role');
         return $role;
     }