Closed kaihoffman closed 4 years ago
I disagree with the change. I feel that adding a key should set it as the default (as the use case is you want to be using it, that's why you're adding it) and it should confirm that it did so. If there are NO apikeys, then maybe display an error, but if you happen to be in a state where you list apikeys and there's no default, set the first one to be default and then display it.
Maybe the code to get the current apikey when making a request should error out if there is no default key. And the code to list all APIkeys should set the default AFTER telling you it's done so.
Sorry to leave this hanging! Have implemented the following:
Checks whether a current key exists if the user calls
apikey current
and returns a friendly error if nil Closes #45