trunk
vilmibm 2022-07-15 23:59:52 -07:00
parent 66471f74d2
commit 52c3818cf6
2 changed files with 1 additions and 2 deletions

View File

@ -102,7 +102,6 @@ func (s *gameWorldServer) Register(ctx context.Context, auth *proto.AuthInfo) (s
}
func (s *gameWorldServer) Login(ctx context.Context, auth *proto.AuthInfo) (si *proto.SessionInfo, err error) {
fmt.Printf("DBG %#v\n", "HI")
var a *db.Account
a, err = db.ValidateCredentials(auth.Username, auth.Password)
if err != nil {

View File

@ -38,7 +38,7 @@ func CreateAccount(name, password string) (*Account, error) {
return nil, err
}
row := conn.QueryRow(context.Background(), "SELECT id,name,pwhash FROM accounts WHERE name = $1")
row := conn.QueryRow(context.Background(), "SELECT id,name,pwhash FROM accounts WHERE name = $1", name)
a := &Account{}
err = row.Scan(&a.ID, &a.Name, &a.Pwhash)
if err != nil {