From 1077ab87ffdee4669a661af6404d34c80241d096 Mon Sep 17 00:00:00 2001 From: Jan Cajthaml Date: Mon, 15 Apr 2019 14:28:13 +0200 Subject: [PATCH] replace all spaces in account name request with underscore (#110) --- services/vault-rest/model/model.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/vault-rest/model/model.go b/services/vault-rest/model/model.go index 893efaef..03b14e68 100644 --- a/services/vault-rest/model/model.go +++ b/services/vault-rest/model/model.go @@ -16,6 +16,7 @@ package model import ( "fmt" + "strings" "github.com/jancajthaml-openbank/vault-rest/utils" ) @@ -69,7 +70,8 @@ func (entity *Account) UnmarshalJSON(data []byte) error { } else { entity.IsBalanceCheck = *all.IsBalanceCheck } - entity.Name = all.Name + + entity.Name = strings.Replace(all.Name, " ", "_", -1) entity.Currency = all.Currency return nil }