From 2bd8dc17d1a8e65024c473a2632b06c59c638d17 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 29 Dec 2024 23:19:26 +0800 Subject: [PATCH] :bug: Fix analyze now query issue --- pkg/internal/server/api/up_direct_api.go | 2 +- pkg/internal/server/api/up_multipart_api.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/internal/server/api/up_direct_api.go b/pkg/internal/server/api/up_direct_api.go index feafcd8..5fa8eda 100644 --- a/pkg/internal/server/api/up_direct_api.go +++ b/pkg/internal/server/api/up_direct_api.go @@ -66,7 +66,7 @@ func createAttachmentDirectly(c *fiber.Ctx) error { metadata.Pool = &pool - if !c.QueryBool("analyzeNow", false) { + if c.QueryBool("analyzeNow", false) { services.AnalyzeAttachment(metadata) } else { services.PublishAnalyzeTask(metadata) diff --git a/pkg/internal/server/api/up_multipart_api.go b/pkg/internal/server/api/up_multipart_api.go index 819e0a9..e27d082 100644 --- a/pkg/internal/server/api/up_multipart_api.go +++ b/pkg/internal/server/api/up_multipart_api.go @@ -130,7 +130,7 @@ func uploadFragmentChunk(c *fiber.Ctx) error { return fiber.NewError(fiber.StatusInternalServerError, err.Error()) } - if !c.QueryBool("analyzeNow", false) { + if c.QueryBool("analyzeNow", false) { services.AnalyzeAttachment(attachment) } else { services.PublishAnalyzeTask(attachment)