1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-12-20 19:09:07 +01:00

Use correct type for nodes command

This commit is contained in:
Kristoffer Dalby 2021-11-21 21:34:03 +00:00
parent 1687e3b03f
commit b152e53b13
No known key found for this signature in database
GPG Key ID: 09F62DC067465735

View File

@ -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,
@ -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)
@ -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,
@ -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)
@ -331,7 +331,7 @@ 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)
@ -339,7 +339,7 @@ func sharingWorker(
}
machineRequest := &v1.GetMachineRequest{
MachineId: uint64(identifier),
MachineId: identifier,
}
machineResponse, err := client.GetMachine(ctx, machineRequest)