Fix account session insert query typo

pull/1/head
Flashfyre 1 year ago
parent 9d9a24fb96
commit 9ef76f1064

@ -16,7 +16,7 @@ func AddAccountRecord(uuid []byte, username string, key, salt []byte) error {
} }
func AddAccountSession(username string, token []byte) error { func AddAccountSession(username string, token []byte) error {
_, err := handle.Exec("INSERT INTO sessions (token, uuid, expire) SELECT a.uuid, ?, DATE_ADD(UTC_TIMESTAMP(), INTERVAL 1 WEEK) FROM accounts a WHERE a.username = ?", token, username) _, err := handle.Exec("INSERT INTO sessions (uuid, token, expire) SELECT a.uuid, ?, DATE_ADD(UTC_TIMESTAMP(), INTERVAL 1 WEEK) FROM accounts a WHERE a.username = ?", token, username)
if err != nil { if err != nil {
return err return err
} }

Loading…
Cancel
Save