Обновить not_sorted/register.go

This commit is contained in:
2025-01-29 09:24:46 +01:00
parent 518942bcec
commit 1ea258aebf

View File

@@ -50,7 +50,7 @@ func main() {
} }
check_auth := fmt.Sprintf("SELECT ID, login WHERE login=%s", input.Login) check_auth := fmt.Sprintf("SELECT ID, login WHERE login=%s", input.Login)
is_exist := db.Exec(check_auth) is_exist := db.Insert_Data(check_auth)
if is_exist{ if is_exist{
pswd := HashPassword(input.Password) pswd := HashPassword(input.Password)
formatted := fmt.Sprintf("INSERT INTO users (login, hash_password) VALUES (%s, %s)", input.Login, pswd) formatted := fmt.Sprintf("INSERT INTO users (login, hash_password) VALUES (%s, %s)", input.Login, pswd)