From 44428162ca8a6c646fbb3330e8dbde8738f54a8f Mon Sep 17 00:00:00 2001 From: slonkazoid Date: Sun, 29 Dec 2024 22:49:55 +0300 Subject: [PATCH] update conflict resolution, in the right place, and with correct syntax (you didnt see the past 2 commits) --- blogin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blogin.sh b/blogin.sh index 9b512b8..a2a7850 100644 --- a/blogin.sh +++ b/blogin.sh @@ -66,7 +66,7 @@ case "$action" in hash=$(printf '%s' "$password" | argon2_hash) echo "registering user $username" >&2 unset password - db_query "INSERT INTO users (username, password) VALUES ($(escape_sql_str "$username"), $(escape_sql_str "$hash")) ON CONFLICT (username) DO SET password=excluded.password" >&2 + db_query "INSERT INTO users (username, password) VALUES ($(escape_sql_str "$username"), $(escape_sql_str "$hash")) ON CONFLICT (username) DO UPDATE SET password=excluded.password" >&2 created=true else