From f4ee2728652d1c1238560a4f71834bab8109d213 Mon Sep 17 00:00:00 2001 From: Arzumify Date: Mon, 14 Oct 2024 12:31:14 +0100 Subject: [PATCH] Fixed duplicate created entry Signed-off-by: Arzumify --- services-src/auth/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services-src/auth/main.go b/services-src/auth/main.go index 0162a8b..1a98aa1 100644 --- a/services-src/auth/main.go +++ b/services-src/auth/main.go @@ -628,7 +628,7 @@ func Main(information library.ServiceInitializationInformation) { return } - _, err = conn.DB.Exec("INSERT INTO users (id, created, username, publicKey, created) VALUES ($1, $2, $3, $4, $5)", userID, time.Now().Unix(), data.Username, publicKey, time.Now().Unix()) + _, err = conn.DB.Exec("INSERT INTO users (id, created, username, publicKey) VALUES ($1, $2, $3, $4)", userID, time.Now().Unix(), data.Username, publicKey) if err != nil { if strings.Contains(err.Error(), "UNIQUE constraint failed") { renderJSON(409, w, map[string]interface{}{"error": "Username already taken"}, information)