Skip to content

Commit

Permalink
Allow removing current API key
Browse files Browse the repository at this point in the history
  • Loading branch information
uzaxirr committed May 16, 2024
1 parent 0e477bd commit 8827f78
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions cmd/apikey/apikey_remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ var apikeyRemoveCmd = &cobra.Command{
os.Exit(1)
}

// Check if the requested API key is the current one
if index == config.Current.Meta.CurrentAPIKey {
utility.Warning("The API key %q is the current one, please change it before removing it", args[0])
os.Exit(1)
}

if utility.UserConfirmedDeletion("api key", common.DefaultYes, args[0]) {
numKeys := len(config.Current.APIKeys)
delete(config.Current.APIKeys, index)
Expand Down

0 comments on commit 8827f78

Please sign in to comment.