fix: fileHash 필수 조건 제거 (선택 입력으로 변경)
All checks were successful
Server CI/CD / deploy (push) Successful in 35s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 22:34:53 +09:00
parent 8dee6f70b3
commit 003eb4c1c2

View File

@@ -26,8 +26,8 @@ func (h *Handler) Upsert(c *fiber.Ctx) error {
FileSize string `json:"fileSize"` FileSize string `json:"fileSize"`
FileHash string `json:"fileHash"` FileHash string `json:"fileHash"`
} }
if err := c.BodyParser(&body); err != nil || body.URL == "" || body.Version == "" || body.FileHash == "" { if err := c.BodyParser(&body); err != nil || body.URL == "" || body.Version == "" {
return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{"error": "url, version, fileHash는 필수입니다"}) return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{"error": "url version 필수입니다"})
} }
info, err := h.svc.Upsert(body.URL, body.Version, body.FileName, body.FileSize, body.FileHash) info, err := h.svc.Upsert(body.URL, body.Version, body.FileName, body.FileSize, body.FileHash)
if err != nil { if err != nil {