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 4dd220d commit c75cf8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/courses.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ 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 {
enrolled, err = r.CoursesDao.IsUserEnrolledInCourse(tumLiveContext.User.ID, course.ID)
if user != nil {
enrolled, err = r.CoursesDao.IsUserEnrolledInCourse(user.ID, course.ID)
if err != nil {
enrolled = false
}
Expand Down

0 comments on commit c75cf8f

Please sign in to comment.