Skip to content

Commit

Permalink
Use correct type for nodes command
Browse files Browse the repository at this point in the history
  • Loading branch information
kradalby committed Nov 21, 2021
1 parent 1687e3b commit b152e53
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/headscale/cli/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ var expireNodeCmd = &cobra.Command{
Run: func(cmd *cobra.Command, args []string) {
output, _ := cmd.Flags().GetString("output")

identifier, err := cmd.Flags().GetInt("identifier")
identifier, err := cmd.Flags().GetUint64("identifier")
if err != nil {
ErrorOutput(
err,
Expand All @@ -207,7 +207,7 @@ var expireNodeCmd = &cobra.Command{
defer conn.Close()

request := &v1.ExpireMachineRequest{
MachineId: uint64(identifier),
MachineId: identifier,
}

response, err := client.ExpireMachine(ctx, request)
Expand All @@ -234,7 +234,7 @@ var deleteNodeCmd = &cobra.Command{
Run: func(cmd *cobra.Command, args []string) {
output, _ := cmd.Flags().GetString("output")

identifier, err := cmd.Flags().GetInt("identifier")
identifier, err := cmd.Flags().GetUint64("identifier")
if err != nil {
ErrorOutput(
err,
Expand All @@ -250,7 +250,7 @@ var deleteNodeCmd = &cobra.Command{
defer conn.Close()

getRequest := &v1.GetMachineRequest{
MachineId: uint64(identifier),
MachineId: identifier,
}

getResponse, err := client.GetMachine(ctx, getRequest)
Expand Down Expand Up @@ -331,15 +331,15 @@ func sharingWorker(
defer cancel()
defer conn.Close()

identifier, err := cmd.Flags().GetInt("identifier")
identifier, err := cmd.Flags().GetUint64("identifier")
if err != nil {
ErrorOutput(err, fmt.Sprintf("Error converting ID to integer: %s", err), output)

return "", nil, nil, err
}

machineRequest := &v1.GetMachineRequest{
MachineId: uint64(identifier),
MachineId: identifier,
}

machineResponse, err := client.GetMachine(ctx, machineRequest)
Expand Down

0 comments on commit b152e53

Please sign in to comment.