mirror of
https://github.com/juanfont/headscale.git
synced 2025-07-28 16:03:42 +00:00
Fix remaining CLI inconsistencies
- Update users destroy command usage string to reflect --user flag - Fix documentation examples to use --node instead of --identifier - Ensure complete CLI consistency across all commands and docs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
04d2e553bf
commit
91ff5ab34f
@ -74,12 +74,10 @@ func init() {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
|
||||
moveNodeCmd.Flags().Uint64P("user", "u", 0, "New user")
|
||||
moveNodeCmd.Flags().StringP("user", "u", "", "New user (ID, name, or email)")
|
||||
moveNodeCmd.Flags().String("name", "", "New username")
|
||||
|
||||
err = moveNodeCmd.MarkFlagRequired("user")
|
||||
if err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
// One of --user or --name is required (checked in GetUserIdentifier)
|
||||
nodeCmd.AddCommand(moveNodeCmd)
|
||||
|
||||
tagCmd.Flags().StringP("node", "n", "", "Node identifier (ID, name, hostname, or IP)")
|
||||
@ -505,7 +503,7 @@ var moveNodeCmd = &cobra.Command{
|
||||
return
|
||||
}
|
||||
|
||||
user, err := cmd.Flags().GetUint64("user")
|
||||
userID, err := GetUserIdentifier(cmd)
|
||||
if err != nil {
|
||||
ErrorOutput(
|
||||
err,
|
||||
@ -532,7 +530,7 @@ var moveNodeCmd = &cobra.Command{
|
||||
|
||||
moveRequest := &v1.MoveNodeRequest{
|
||||
NodeId: identifier,
|
||||
User: user,
|
||||
User: userID,
|
||||
}
|
||||
|
||||
moveResponse, err := client.MoveNode(ctx, moveRequest)
|
||||
|
@ -129,7 +129,7 @@ var createUserCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
var destroyUserCmd = &cobra.Command{
|
||||
Use: "destroy --user USER or --name NAME",
|
||||
Use: "destroy --user USER",
|
||||
Short: "Destroys a user",
|
||||
Aliases: []string{"delete"},
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user