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 667e5f4 commit b88438d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/courses.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func (r coursesRoutes) getPinned(c *gin.Context) {
var err error
// todo: check if user is allowed to see the course
// -> Get full course from database
if tumLiveContext.User != nil {
if tumLiveContext.User != nil && course != nil {

Check failure on line 293 in api/courses.go

View workflow job for this annotation

GitHub Actions / lint (./...)

invalid operation: course != nil (mismatched types model.Course and untyped nil)) (typecheck)

Check failure on line 293 in api/courses.go

View workflow job for this annotation

GitHub Actions / lint (./...)

invalid operation: course != nil (mismatched types model.Course and untyped nil)) (typecheck)

Check failure on line 293 in api/courses.go

View workflow job for this annotation

GitHub Actions / lint (./...)

invalid operation: course != nil (mismatched types model.Course and untyped nil) (typecheck)

Check failure on line 293 in api/courses.go

View workflow job for this annotation

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

invalid operation: course != nil (mismatched types model.Course and untyped nil)

Check failure on line 293 in api/courses.go

View workflow job for this annotation

GitHub Actions / lint (./worker)

invalid operation: course != nil (mismatched types model.Course and untyped nil)) (typecheck)

Check failure on line 293 in api/courses.go

View workflow job for this annotation

GitHub Actions / lint (./worker)

invalid operation: course != nil (mismatched types model.Course and untyped nil)) (typecheck)

Check failure on line 293 in api/courses.go

View workflow job for this annotation

GitHub Actions / lint (./worker)

invalid operation: course != nil (mismatched types model.Course and untyped nil) (typecheck)

Check failure on line 293 in api/courses.go

View workflow job for this annotation

GitHub Actions / lint (./worker/edge)

invalid operation: course != nil (mismatched types model.Course and untyped nil)) (typecheck)

Check failure on line 293 in api/courses.go

View workflow job for this annotation

GitHub Actions / lint (./worker/edge)

invalid operation: course != nil (mismatched types model.Course and untyped nil)) (typecheck)

Check failure on line 293 in api/courses.go

View workflow job for this annotation

GitHub Actions / lint (./worker/edge)

invalid operation: course != nil (mismatched types model.Course and untyped nil) (typecheck)
enrolled, err = r.CoursesDao.IsUserEnrolledInCourse(tumLiveContext.User.ID, course.ID)
if err != nil {
enrolled = false
Expand Down

0 comments on commit b88438d

Please sign in to comment.