fix: fileHash 필수 조건 제거 (선택 입력으로 변경)
All checks were successful
Server CI/CD / deploy (push) Successful in 35s
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:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user