oops
parent
66471f74d2
commit
52c3818cf6
|
@ -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) {
|
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
|
var a *db.Account
|
||||||
a, err = db.ValidateCredentials(auth.Username, auth.Password)
|
a, err = db.ValidateCredentials(auth.Username, auth.Password)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -38,7 +38,7 @@ func CreateAccount(name, password string) (*Account, error) {
|
||||||
return nil, err
|
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{}
|
a := &Account{}
|
||||||
err = row.Scan(&a.ID, &a.Name, &a.Pwhash)
|
err = row.Scan(&a.ID, &a.Name, &a.Pwhash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue