mirror of
https://github.com/juanfont/headscale.git
synced 2026-11-20 04:14:32 +09:00
cli: fix users rename when resolved by name
The rename request sent the raw --identifier flag value, which is 0 when the user was resolved with --name, so the API answered "user not found". Send the matched user's ID instead. Equivalent of #3442 on main, rewritten: that fix targets the v1 HTTP client, which 0.29 does not have.
This commit is contained in:
1 parent
625fa86e1a
commit
b3b55cc472
2 files changed
+41
-2
No files matched your search
@@ -231,7 +231,7 @@ var renameUserCmd = &cobra.Command{
|
||||
newName, _ := cmd.Flags().GetString("new-name")
|
||||
|
||||
renameReq := &v1.RenameUserRequest{
|
||||
OldId: id,
|
||||
OldId: users.GetUsers()[0].GetId(),
|
||||
NewName: newName,
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user