small pattern fixes

This commit is contained in:
Fran Jurmanović
2021-06-22 17:18:48 +02:00
parent 2992d433fa
commit 830fa65f8a
4 changed files with 5 additions and 5 deletions

View File

@@ -42,6 +42,7 @@ func (as *TransactionService) GetAll(am *models.Auth, walletId string, filtered
if walletId != "" {
query2 = query2.Where("? = ?", pg.Ident("wallet_id"), walletId)
}
query2.Select()
for _, sub := range *sm {
as.Ss.SubToTrans(&sub)

View File

@@ -40,7 +40,7 @@ func (as *WalletService) GetAll(am *models.Auth, filtered *models.FilteredRespon
FilteredResponse(query, wm, filtered)
}
func (as *WalletService) GetHeader(am *models.Auth, embed string, walletId string) *models.WalletHeader {
func (as *WalletService) GetHeader(am *models.Auth, walletId string) *models.WalletHeader {
wm := new(models.WalletHeader)
wallets := new([]models.WalletTransactions)
var wg sync.WaitGroup
@@ -117,7 +117,7 @@ func (as *WalletService) GetHeader(am *models.Auth, embed string, walletId strin
func addWhere(s *[]models.WalletTransactions, walletId string, e models.Transaction) {
var exists bool
for a, _ := range *s {
for a := range *s {
if (*s)[a].WalletId == walletId {
(*s)[a].Transactions = append((*s)[a].Transactions, e)
exists = true