From 8827f78d9b4c568efd943d4e05cb120e870d076e Mon Sep 17 00:00:00 2001 From: Uzair Ali <72073401+uzaxirr@users.noreply.github.com> Date: Thu, 16 May 2024 11:19:36 +0530 Subject: [PATCH] Allow removing current API key --- cmd/apikey/apikey_remove.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cmd/apikey/apikey_remove.go b/cmd/apikey/apikey_remove.go index 2892bcf3..a2f014f2 100644 --- a/cmd/apikey/apikey_remove.go +++ b/cmd/apikey/apikey_remove.go @@ -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)