From 01c6e4b0c9812970fa300a1704c8cc9b9e7bc7ef Mon Sep 17 00:00:00 2001 From: Vargha Csongor Date: Thu, 18 Apr 2024 23:07:03 +0200 Subject: [PATCH] Fix update person --- backend/handlers/updatePerson.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/handlers/updatePerson.go b/backend/handlers/updatePerson.go index f543df7..ce094cb 100644 --- a/backend/handlers/updatePerson.go +++ b/backend/handlers/updatePerson.go @@ -28,9 +28,9 @@ func UpdatePerson(driver neo4j.DriverWithContext) gin.HandlerFunc { return } - if person.ID != "" { + if person.ID == "" { log.Printf("ip: %s error: %s", c.ClientIP(), err) - c.JSON(http.StatusBadRequest, gin.H{"error": "no person ID provided"}) + c.JSON(http.StatusBadRequest, gin.H{"error": "No ID provided"}) return }