Skip to content

Commit

Permalink
Include versions in registration request
Browse files Browse the repository at this point in the history
  • Loading branch information
bradtgmurray committed Jan 9, 2024
1 parent e5c6708 commit 1335cf8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea

mac-registration-provider
16 changes: 9 additions & 7 deletions relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ type WebsocketRequest[T any] struct {
}

type RegisterBody struct {
Code string `json:"code,omitempty"`
Secret string `json:"secret,omitempty"`
Commit string `json:"commit,omitempty"`
Error string `json:"error,omitempty"`
Code string `json:"code,omitempty"`
Secret string `json:"secret,omitempty"`
Commit string `json:"commit,omitempty"`
Versions versions.Versions `json:"versions"`
Error string `json:"error,omitempty"`
}

type ErrorResponse struct {
Expand Down Expand Up @@ -166,9 +167,10 @@ func ConnectRelay(ctx context.Context, addr string) error {
Command: "register",
ReqID: 1,
Data: &RegisterBody{
Code: config.Code,
Secret: config.Secret,
Commit: Commit,
Code: config.Code,
Secret: config.Secret,
Commit: Commit,
Versions: versions.Current,
},
})
if err != nil {
Expand Down

0 comments on commit 1335cf8

Please sign in to comment.