sum7/warehost
sum7
/
warehost
Archived
1
0
Fork 0

[host] domain preload on webList and mailList

This commit is contained in:
Martin Geno 2016-10-22 20:58:03 +02:00
parent f3d9d2d18a
commit c0970754cb
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ func mailList(ctx context.Context, w http.ResponseWriter, r *http.Request) (retu
logger.Info("not found") logger.Info("not found")
return return
} }
dbconnection.Where("domain = ?", domain.ID).Find(&mail) dbconnection.Where("domain = ?", domain.ID).Preload("Domain").Find(&mail)
logger.Info("done") logger.Info("done")
returndata = mail returndata = mail
return return

View File

@ -44,7 +44,7 @@ func webList(ctx context.Context, w http.ResponseWriter, r *http.Request) (retur
logger.Info("not found") logger.Info("not found")
return return
} }
dbconnection.Where("domain = ?", domain.ID).Find(&web) dbconnection.Where("domain = ?", domain.ID).Preload("Domain").Find(&web)
logger.Info("done") logger.Info("done")
returndata = web returndata = web
return return