mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-27 06:35:52 -05:00
Merge pull request #165 from juanfont/expire-json
Show JSON on error when expiring key
This commit is contained in:
commit
829a8c4381
@ -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 New Issue
Block a user