🐛 Fix cache issue

This commit is contained in:
2024-12-29 01:03:22 +08:00
parent b041ce3e06
commit e89f149336
6 changed files with 28 additions and 14 deletions

View File

@ -86,7 +86,10 @@ func listAttachment(c *fiber.Ctx) error {
var out []models.Attachment
if err := tx.
Offset(offset).Limit(take).
Preload("Thumbnail").Preload("Compressed").
Preload("Pool").
Preload("Thumbnail").
Preload("Compressed").
Preload("Boosts").
Find(&out).Error; err != nil {
return fiber.NewError(fiber.StatusBadRequest, err.Error())
}

View File

@ -129,7 +129,6 @@ func uploadFragmentChunk(c *fiber.Ctx) error {
if err := database.C.Save(&attachment).Error; err != nil {
return fiber.NewError(fiber.StatusInternalServerError, err.Error())
}
services.CacheAttachment(attachment)
if !c.QueryBool("analyzeNow", false) {
services.AnalyzeAttachment(attachment)