Commit 7d043e93 authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Fix unlinking device identifiers on console user account details page.

parent 8e27da50
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr
### Fixed
- Fix delayed first time invocation of tournament and leaderboard callbacks.
- Expired tournaments will no longer be listed nor any records will be returned.
- Unlink device identifiers on console user account details page.

## [2.5.1] - 2019-05-03
### Changed
+6 −6

File changed.

Preview size limit exceeded, changes collapsed.

+133 −133

File changed.

Preview size limit exceeded, changes collapsed.

+8 −8
Original line number Diff line number Diff line
@@ -648,14 +648,18 @@ func request_Console_UnlinkCustom_0(ctx context.Context, marshaler runtime.Marsh

}

var (
	filter_Console_UnlinkDevice_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
)

func request_Console_UnlinkDevice_0(ctx context.Context, marshaler runtime.Marshaler, client ConsoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
	var protoReq UnlinkDeviceRequest
	var metadata runtime.ServerMetadata

	newReader, berr := utilities.IOReaderFactory(req.Body)
	if berr != nil {
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
	}
	if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
	}

	var (
		val string
		ok  bool
@@ -674,10 +678,6 @@ func request_Console_UnlinkDevice_0(ctx context.Context, marshaler runtime.Marsh
		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
	}

	if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Console_UnlinkDevice_0); err != nil {
		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
	}

	msg, err := client.UnlinkDevice(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
	return msg, metadata, err

+4 −1
Original line number Diff line number Diff line
@@ -187,7 +187,10 @@ service Console {

  // Unlink the device ID from a user account.
  rpc UnlinkDevice (UnlinkDeviceRequest) returns (google.protobuf.Empty) {
    option (google.api.http).post = "/v2/console/account/{id}/unlink/device";
    option (google.api.http) = {
      post: "/v2/console/account/{id}/unlink/device",
      body: "*"
    };
  }

  // Unlink the email from a user account.
Loading