diff --git a/service/model/user.go b/service/model/user.go index b17574b..304bd36 100644 --- a/service/model/user.go +++ b/service/model/user.go @@ -6,5 +6,5 @@ type User struct { Username string `json:"username"` Firstname string `json:"firstname"` Lastname string `json:"lastname"` - Articles []Article `gorm:"foreignKey:Author"` + Articles []Article `json:"articles" gorm:"foreignKey:Author"` }