Add token cmd to combined and consolidate logic

This commit is contained in:
Viktor Liu
2026-02-13 11:15:42 +01:00
parent 3508144575
commit 4efea823bf
6 changed files with 260 additions and 169 deletions

View File

@@ -81,9 +81,7 @@ func init() {
rootCmd.AddCommand(migrationCmd)
tokenCmd.PersistentFlags().StringVar(&nbconfig.MgmtConfigPath, "config", defaultMgmtConfig, "Netbird config file location")
tokenCmd.AddCommand(tokenCreateCmd)
tokenCmd.AddCommand(tokenListCmd)
tokenCmd.AddCommand(tokenRevokeCmd)
rootCmd.AddCommand(tokenCmd)
tc := newTokenCommands()
tc.PersistentFlags().StringVar(&nbconfig.MgmtConfigPath, "config", defaultMgmtConfig, "Netbird config file location")
rootCmd.AddCommand(tc)
}