mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 04:17:23 +00:00
Show file uploader.
This commit is contained in:
@@ -38,6 +38,7 @@ func GetResourceByID(id uint) (model.Resource, error) {
|
||||
Preload("Images").
|
||||
Preload("Tags").
|
||||
Preload("Files").
|
||||
Preload("Files.User").
|
||||
First(&r, id).Error; err != nil {
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
return model.Resource{}, model.NewNotFoundError("Resource not found")
|
||||
|
Reference in New Issue
Block a user