[host] domain preload on webList and mailList
This commit is contained in:
parent
f3d9d2d18a
commit
c0970754cb
|
@ -44,7 +44,7 @@ func mailList(ctx context.Context, w http.ResponseWriter, r *http.Request) (retu
|
|||
logger.Info("not found")
|
||||
return
|
||||
}
|
||||
dbconnection.Where("domain = ?", domain.ID).Find(&mail)
|
||||
dbconnection.Where("domain = ?", domain.ID).Preload("Domain").Find(&mail)
|
||||
logger.Info("done")
|
||||
returndata = mail
|
||||
return
|
||||
|
|
|
@ -44,7 +44,7 @@ func webList(ctx context.Context, w http.ResponseWriter, r *http.Request) (retur
|
|||
logger.Info("not found")
|
||||
return
|
||||
}
|
||||
dbconnection.Where("domain = ?", domain.ID).Find(&web)
|
||||
dbconnection.Where("domain = ?", domain.ID).Preload("Domain").Find(&web)
|
||||
logger.Info("done")
|
||||
returndata = web
|
||||
return
|
||||
|
|
Reference in New Issue