🐛 Fix did not preload pack when listing
This commit is contained in:
parent
9ea1012f19
commit
22070a464b
@ -91,7 +91,9 @@ func listStickers(c *fiber.Ctx) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var stickers []models.Sticker
|
var stickers []models.Sticker
|
||||||
if err := tx.Limit(take).Offset(offset).Preload("Attachment").Find(&stickers).Error; err != nil {
|
if err := tx.Limit(take).Offset(offset).
|
||||||
|
Preload("Attachment").Preload("Pack").
|
||||||
|
Find(&stickers).Error; err != nil {
|
||||||
return fiber.NewError(fiber.StatusInternalServerError, err.Error())
|
return fiber.NewError(fiber.StatusInternalServerError, err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user