[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")
|
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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Reference in New Issue