Browse Source

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

visuddhinanda 2 năm trước cách đây
mục cha
commit
8e93829642
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      app/Http/Api/CourseApi.php

+ 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;
     }