configstore: check token name is not empty
This commit is contained in:
parent
cbd971619b
commit
2fab8ad85b
@ -645,6 +645,9 @@ func (s *CommandHandler) CreateUserToken(ctx context.Context, userName, tokenNam
|
||||
if userName == "" {
|
||||
return "", util.NewErrBadRequest(errors.Errorf("user name required"))
|
||||
}
|
||||
if tokenName == "" {
|
||||
return "", util.NewErrBadRequest(errors.Errorf("token name required"))
|
||||
}
|
||||
|
||||
var user *types.User
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user