Loading Gopkg.lock +0 −8 Original line number Diff line number Diff line Loading @@ -160,13 +160,6 @@ revision = "7f2434bc10da710debe5c4315ed6d4df454b4024" version = "v0.1.0" [[projects]] digest = "1:c05e492e19a0704f4fee4d546ca899586c176b73f31c4a06051473ea75e7eaa2" name = "github.com/cockroachdb/cockroach-go" packages = ["crdb"] pruneopts = "" revision = "59c0560478b705bf9bd12f9252224a0fad7c87df" [[projects]] branch = "master" digest = "1:21aee7b432ce1298869959e614776826b3a7f7777722589879f027fbee819820" Loading Loading @@ -789,7 +782,6 @@ "contrib.go.opencensus.io/exporter/stackdriver", "github.com/blevesearch/bleve", "github.com/blevesearch/bleve/analysis/analyzer/keyword", "github.com/cockroachdb/cockroach-go/crdb", "github.com/dgrijalva/jwt-go", "github.com/go-yaml/yaml", "github.com/gobuffalo/packr", Loading Gopkg.toml +0 −4 Original line number Diff line number Diff line Loading @@ -76,10 +76,6 @@ ignored = ["go.opencensus.io/exporter/stackdriver"] name = "github.com/stretchr/testify" version = "~1.2.2" [[constraint]] name = "github.com/cockroachdb/cockroach-go" revision = "59c0560478b705bf9bd12f9252224a0fad7c87df" [[constraint]] name = "github.com/blevesearch/bleve" revision = "5cf4e4e02e8a1aec8df8c6773d08e364ee694cea" Loading server/api_link.go +1 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ import ( "strconv" "strings" "github.com/cockroachdb/cockroach-go/crdb" "github.com/gofrs/uuid" "github.com/golang/protobuf/ptypes/empty" "github.com/heroiclabs/nakama/api" Loading Loading @@ -137,7 +136,7 @@ func (s *ApiServer) LinkDevice(ctx context.Context, in *api.AccountDevice) (*emp return nil, status.Error(codes.Internal, "Error linking Device ID.") } err = crdb.ExecuteInTx(ctx, tx, func() error { err = ExecuteInTx(ctx, tx, func() error { var dbDeviceIdLinkedUser int64 err := tx.QueryRowContext(ctx, "SELECT COUNT(id) FROM user_device WHERE id = $1 AND user_id = $2 LIMIT 1", deviceID, userID).Scan(&dbDeviceIdLinkedUser) if err != nil { Loading server/api_unlink.go +1 −2 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ package server import ( "github.com/cockroachdb/cockroach-go/crdb" "github.com/gofrs/uuid" "github.com/golang/protobuf/ptypes/empty" "github.com/heroiclabs/nakama/api" Loading Loading @@ -126,7 +125,7 @@ func (s *ApiServer) UnlinkDevice(ctx context.Context, in *api.AccountDevice) (*e return nil, status.Error(codes.Internal, "Could not unlink Device ID.") } err = crdb.ExecuteInTx(ctx, tx, func() error { err = ExecuteInTx(ctx, tx, func() error { query := `DELETE FROM user_device WHERE id = $2 AND user_id = $1 AND (EXISTS (SELECT id FROM users WHERE id = $1 AND (facebook_id IS NOT NULL Loading server/console_account.go +1 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import ( "strconv" "strings" "github.com/cockroachdb/cockroach-go/crdb" "github.com/gofrs/uuid" "github.com/golang/protobuf/ptypes/empty" "github.com/golang/protobuf/ptypes/timestamp" Loading Loading @@ -452,7 +451,7 @@ func (s *ConsoleServer) UpdateAccount(ctx context.Context, in *console.UpdateAcc return nil, status.Error(codes.Internal, "An error occurred while trying to update the user.") } if err = crdb.ExecuteInTx(ctx, tx, func() error { if err = ExecuteInTx(ctx, tx, func() error { for oldDeviceID, newDeviceID := range in.DeviceIds { if newDeviceID == "" { query := `DELETE FROM user_device WHERE id = $2 AND user_id = $1 Loading Loading
Gopkg.lock +0 −8 Original line number Diff line number Diff line Loading @@ -160,13 +160,6 @@ revision = "7f2434bc10da710debe5c4315ed6d4df454b4024" version = "v0.1.0" [[projects]] digest = "1:c05e492e19a0704f4fee4d546ca899586c176b73f31c4a06051473ea75e7eaa2" name = "github.com/cockroachdb/cockroach-go" packages = ["crdb"] pruneopts = "" revision = "59c0560478b705bf9bd12f9252224a0fad7c87df" [[projects]] branch = "master" digest = "1:21aee7b432ce1298869959e614776826b3a7f7777722589879f027fbee819820" Loading Loading @@ -789,7 +782,6 @@ "contrib.go.opencensus.io/exporter/stackdriver", "github.com/blevesearch/bleve", "github.com/blevesearch/bleve/analysis/analyzer/keyword", "github.com/cockroachdb/cockroach-go/crdb", "github.com/dgrijalva/jwt-go", "github.com/go-yaml/yaml", "github.com/gobuffalo/packr", Loading
Gopkg.toml +0 −4 Original line number Diff line number Diff line Loading @@ -76,10 +76,6 @@ ignored = ["go.opencensus.io/exporter/stackdriver"] name = "github.com/stretchr/testify" version = "~1.2.2" [[constraint]] name = "github.com/cockroachdb/cockroach-go" revision = "59c0560478b705bf9bd12f9252224a0fad7c87df" [[constraint]] name = "github.com/blevesearch/bleve" revision = "5cf4e4e02e8a1aec8df8c6773d08e364ee694cea" Loading
server/api_link.go +1 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ import ( "strconv" "strings" "github.com/cockroachdb/cockroach-go/crdb" "github.com/gofrs/uuid" "github.com/golang/protobuf/ptypes/empty" "github.com/heroiclabs/nakama/api" Loading Loading @@ -137,7 +136,7 @@ func (s *ApiServer) LinkDevice(ctx context.Context, in *api.AccountDevice) (*emp return nil, status.Error(codes.Internal, "Error linking Device ID.") } err = crdb.ExecuteInTx(ctx, tx, func() error { err = ExecuteInTx(ctx, tx, func() error { var dbDeviceIdLinkedUser int64 err := tx.QueryRowContext(ctx, "SELECT COUNT(id) FROM user_device WHERE id = $1 AND user_id = $2 LIMIT 1", deviceID, userID).Scan(&dbDeviceIdLinkedUser) if err != nil { Loading
server/api_unlink.go +1 −2 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ package server import ( "github.com/cockroachdb/cockroach-go/crdb" "github.com/gofrs/uuid" "github.com/golang/protobuf/ptypes/empty" "github.com/heroiclabs/nakama/api" Loading Loading @@ -126,7 +125,7 @@ func (s *ApiServer) UnlinkDevice(ctx context.Context, in *api.AccountDevice) (*e return nil, status.Error(codes.Internal, "Could not unlink Device ID.") } err = crdb.ExecuteInTx(ctx, tx, func() error { err = ExecuteInTx(ctx, tx, func() error { query := `DELETE FROM user_device WHERE id = $2 AND user_id = $1 AND (EXISTS (SELECT id FROM users WHERE id = $1 AND (facebook_id IS NOT NULL Loading
server/console_account.go +1 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import ( "strconv" "strings" "github.com/cockroachdb/cockroach-go/crdb" "github.com/gofrs/uuid" "github.com/golang/protobuf/ptypes/empty" "github.com/golang/protobuf/ptypes/timestamp" Loading Loading @@ -452,7 +451,7 @@ func (s *ConsoleServer) UpdateAccount(ctx context.Context, in *console.UpdateAcc return nil, status.Error(codes.Internal, "An error occurred while trying to update the user.") } if err = crdb.ExecuteInTx(ctx, tx, func() error { if err = ExecuteInTx(ctx, tx, func() error { for oldDeviceID, newDeviceID := range in.DeviceIds { if newDeviceID == "" { query := `DELETE FROM user_device WHERE id = $2 AND user_id = $1 Loading