configstore: check token name is not empty

This commit is contained in:
Simone Gotti 2019-04-29 16:59:09 +02:00
parent cbd971619b
commit 2fab8ad85b

View File

@ -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