Skip to content

Commit

Permalink
Update courses.go
Browse files Browse the repository at this point in the history
  • Loading branch information
KemalKrKX authored Dec 5, 2024
1 parent 6514507 commit 236d564
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/courses.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,10 @@ func (r coursesRoutes) getPinned(c *gin.Context) {
for _, course := range pinnedCourses {
// todo: check if user is allowed to see the course
// -> Get full course from database
enrolled, err := r.CoursesDao.IsUserEnrolledInCourse(tumLiveContext.User.ID, course.ID)
if err != nil {
enrolled = false
}
//enrolled, err := r.CoursesDao.IsUserEnrolledInCourse(tumLiveContext.User.ID, course.ID)
//if err != nil {
//enrolled = false
//}
if course.Visibility == "enrolled" && !enrolled {

Check failure on line 295 in api/courses.go

View workflow job for this annotation

GitHub Actions / lint (./...)

undefined: enrolled) (typecheck)

Check failure on line 295 in api/courses.go

View workflow job for this annotation

GitHub Actions / lint (./...)

undefined: enrolled) (typecheck)

Check failure on line 295 in api/courses.go

View workflow job for this annotation

GitHub Actions / lint (./...)

undefined: enrolled (typecheck)

Check failure on line 295 in api/courses.go

View workflow job for this annotation

GitHub Actions / test (1.21.x, ubuntu-latest)

undefined: enrolled

Check failure on line 295 in api/courses.go

View workflow job for this annotation

GitHub Actions / lint (./worker)

undefined: enrolled) (typecheck)

Check failure on line 295 in api/courses.go

View workflow job for this annotation

GitHub Actions / lint (./worker)

undefined: enrolled) (typecheck)

Check failure on line 295 in api/courses.go

View workflow job for this annotation

GitHub Actions / lint (./worker)

undefined: enrolled (typecheck)

Check failure on line 295 in api/courses.go

View workflow job for this annotation

GitHub Actions / lint (./worker/edge)

undefined: enrolled) (typecheck)

Check failure on line 295 in api/courses.go

View workflow job for this annotation

GitHub Actions / lint (./worker/edge)

undefined: enrolled) (typecheck)

Check failure on line 295 in api/courses.go

View workflow job for this annotation

GitHub Actions / lint (./worker/edge)

undefined: enrolled (typecheck)
continue
}
Expand Down

0 comments on commit 236d564

Please sign in to comment.