Skip to content

Commit

Permalink
Merge pull request #1117 from mesg-foundation/fix/api-create-instance
Browse files Browse the repository at this point in the history
Return hash on instance creation
  • Loading branch information
krhubert authored Jun 26, 2019
2 parents e794aa8 + 3323d2b commit 40a1278
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 33 deletions.
59 changes: 29 additions & 30 deletions protobuf/api/instance.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions protobuf/api/instance.proto
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ message CreateInstanceRequest {

// The response's data for the `Create` API.
message CreateInstanceResponse {
// The instance created.
definition.Instance instance = 1;
// The instance's hash created.
string hash = 1;
}

// The request's data for the `Delete` API.
Expand Down
2 changes: 1 addition & 1 deletion server/grpc/api/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (s *InstanceServer) Create(ctx context.Context, request *protobuf_api.Creat
if err != nil {
return nil, err
}
return &protobuf_api.CreateInstanceResponse{Instance: toProtoInstance(i)}, nil
return &protobuf_api.CreateInstanceResponse{Hash: i.Hash.String()}, nil
}

// Get retrives instance.
Expand Down

0 comments on commit 40a1278

Please sign in to comment.