mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 20:27:23 +00:00
Improve search
This commit is contained in:
@@ -440,7 +440,13 @@ func BatchGetResources(ids []uint) ([]model.Resource, error) {
|
||||
}
|
||||
|
||||
var resources []model.Resource
|
||||
if err := db.Where("id IN ?", uniqueIds).Find(&resources).Error; err != nil {
|
||||
if err := db.
|
||||
Where("id IN ?", uniqueIds).
|
||||
Preload("User").
|
||||
Preload("Images").
|
||||
Preload("Tags").
|
||||
Find(&resources).
|
||||
Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resources, nil
|
||||
|
Reference in New Issue
Block a user