feat: added tweets to get account endpoint

This commit is contained in:
overflowerror 2021-08-21 16:03:17 +02:00
parent 211f7b42a8
commit 847467e676

View file

@ -9,6 +9,7 @@ func (d *Data) GetAccountsByUser(user *models.User) ([]models.Account, error) {
var accounts []models.Account
err := d.db.
Preload("Threads").
Preload("Threads.Tweets").
Where("user_id = ?", user.ID).
Where("access_token IS NOT NULL").
Find(&accounts).