Skip to content

Commit

Permalink
replace all spaces in account name request with underscore (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
jancajthaml authored Apr 15, 2019
1 parent 9dc50e7 commit 1077ab8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion services/vault-rest/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package model

import (
"fmt"
"strings"

"github.com/jancajthaml-openbank/vault-rest/utils"
)
Expand Down Expand Up @@ -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
}

0 comments on commit 1077ab8

Please sign in to comment.