Check if user already exists and bug fix

This commit is contained in:
2024-02-24 10:56:12 +01:00
parent 8ef6b6472d
commit 280e88a526
4 changed files with 17 additions and 3 deletions

View File

@ -44,7 +44,7 @@ func (db *DB) AddUser(user, pass, first, last string, writer, editor, admin bool
INSERT INTO users
(username, password, first_name, last_name, writer, editor, admin)
VALUES
(?, ?, ?, ?, ?, ?)
(?, ?, ?, ?, ?, ?, ?)
`
_, err = db.Exec(query, user, string(hashedPass), first, last, writer, editor, admin)
if err != nil {