Skip to content

Commit

Permalink
[fix] Preloadの追加
Browse files Browse the repository at this point in the history
  • Loading branch information
yoneyan committed Mar 16, 2021
1 parent 27a5037 commit 490e808
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/api/store/group/v0/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ func GetAll() group.ResultDatabase {
defer db.Close()

var groups []core.Group
err = db.Find(&groups).Error
err = db.Preload("Users").
Find(&groups).Error
return group.ResultDatabase{Group: groups, Err: err}
}

0 comments on commit 490e808

Please sign in to comment.