update second scratch slot properly

This commit is contained in:
Azareal 2020-04-02 21:00:01 +10:00
parent 581f86eeba
commit e7b2333481
2 changed files with 7 additions and 7 deletions

View File

@ -5,7 +5,7 @@ import (
"errors"
"strings"
"github.com/Azareal/Gosora/query_gen"
qgen "github.com/Azareal/Gosora/query_gen"
)
var MFAstore MFAStore
@ -21,7 +21,7 @@ var mfaItemStmts MFAItemStmts
func init() {
DbInits.Add(func(acc *qgen.Accumulator) error {
mfaItemStmts = MFAItemStmts{
update: acc.Update("users_2fa_keys").Set("scratch1 = ?, scratch2, scratch3 = ?, scratch3 = ?, scratch4 = ?, scratch5 = ?, scratch6 = ?, scratch7 = ?, scratch8 = ?").Where("uid = ?").Prepare(),
update: acc.Update("users_2fa_keys").Set("scratch1=?,scratch2=?,scratch3=?,scratch4=?,scratch5=?,scratch6=?,scratch7=?,scratch8=?").Where("uid=?").Prepare(),
delete: acc.Delete("users_2fa_keys").Where("uid=?").Prepare(),
}
return acc.FirstError()