Fix account session insert query typo
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…
Reference in New Issue