Fix update person

This commit is contained in:
2024-04-18 23:07:03 +02:00
parent 564ef322e3
commit 01c6e4b0c9

View File

@@ -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
}