Skip to content

Commit

Permalink
Revert courses.go
Browse files Browse the repository at this point in the history
  • Loading branch information
KemalKrKX authored Dec 6, 2024
1 parent e1107d2 commit 750d8e4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions dao/courses.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,7 @@ func (d coursesDao) DeleteCourse(course model.Course) {
func (d coursesDao) IsUserEnrolledInCourse(user uint, course uint) (bool, error) {
var nRows int64
var err error
if DB == nil {
return false, err
}
err = DB.Table("course_users").Where("user_id = ? AND course_id = ?", user, course).Count(&nRows).Error
err := DB.Table("course_users").Where("user_id = ? AND course_id = ?", user, course).Count(&nRows).Error

Check failure on line 347 in dao/courses.go

View workflow job for this annotation

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

no new variables on left side of :=

Check failure on line 347 in dao/courses.go

View workflow job for this annotation

GitHub Actions / lint (./worker/edge)

no new variables on left side of := (typecheck)

Check failure on line 347 in dao/courses.go

View workflow job for this annotation

GitHub Actions / lint (./worker/edge)

no new variables on left side of :=) (typecheck)

Check failure on line 347 in dao/courses.go

View workflow job for this annotation

GitHub Actions / lint (./worker/edge)

no new variables on left side of :=) (typecheck)

Check failure on line 347 in dao/courses.go

View workflow job for this annotation

GitHub Actions / lint (./worker/edge)

no new variables on left side of :=) (typecheck)
if err != nil {
return false, err
}
Expand Down

0 comments on commit 750d8e4

Please sign in to comment.