소스 검색

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

visuddhinanda 2 년 전
부모
커밋
8e93829642
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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;
     }