Skip to content

Commit 7f0bb02

Browse files
committed
Hide Students from GetCourses json response
1 parent 883b2c1 commit 7f0bb02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/internal/entity/course.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type Course struct {
77
Title string `gorm:"size:255;not null;" json:"title"`
88
Description string `gorm:"size:255;not null;" json:"description"`
99
CreatorID int `gorm:"foreignKey" json:"creator_id"`
10-
Students []Account `gorm:"many2many:enrollment;" json:"students"`
10+
Students []Account `gorm:"many2many:enrollment;" json:"-"`
1111
Tags []Tag `gorm:"many2many:course_tag;" json:"tags"`
1212
Modules []Module `json:"modules"`
1313
}

0 commit comments

Comments
 (0)