From 32afe3ae05982db8e3e9c25ff6545e09adc26ade Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sun, 29 Mar 2020 17:03:22 +0200 Subject: [PATCH] fix user model json marshal --- service/model/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"` }