mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-30 02:43:05 +00:00
Merge branch 'main' into authkey-namespace-preload
This commit is contained in:
commit
0b0f7db534
1 changed files with 5 additions and 1 deletions
|
@ -131,7 +131,7 @@ var createPreAuthKeyCmd = &cobra.Command{
|
||||||
}
|
}
|
||||||
|
|
||||||
var expirePreAuthKeyCmd = &cobra.Command{
|
var expirePreAuthKeyCmd = &cobra.Command{
|
||||||
Use: "expire",
|
Use: "expire KEY",
|
||||||
Short: "Expire a preauthkey",
|
Short: "Expire a preauthkey",
|
||||||
Args: func(cmd *cobra.Command, args []string) error {
|
Args: func(cmd *cobra.Command, args []string) error {
|
||||||
if len(args) < 1 {
|
if len(args) < 1 {
|
||||||
|
@ -153,6 +153,10 @@ var expirePreAuthKeyCmd = &cobra.Command{
|
||||||
|
|
||||||
k, err := h.GetPreAuthKey(n, args[0])
|
k, err := h.GetPreAuthKey(n, args[0])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if strings.HasPrefix(o, "json") {
|
||||||
|
JsonOutput(k, err, o)
|
||||||
|
return
|
||||||
|
}
|
||||||
log.Fatalf("Error getting the key: %s", err)
|
log.Fatalf("Error getting the key: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue