wip: recurring transactions
Some checks failed
Build Docker Image / Build-Docker-Image (push) Has been cancelled
Some checks failed
Build Docker Image / Build-Docker-Image (push) Has been cancelled
This commit is contained in:
@@ -84,6 +84,10 @@ func (h TreasureChestImpl) handleTreasureChestItemComp() http.HandlerFunc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
transactionsRecurring, err := h.transactionRecurring.GetAllByTreasureChest(user, treasureChest.Id.String())
|
transactionsRecurring, err := h.transactionRecurring.GetAllByTreasureChest(user, treasureChest.Id.String())
|
||||||
|
if err != nil {
|
||||||
|
handleError(w, r, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
transactionsRec := tr.TransactionRecurringItems(transactionsRecurring, "", "", treasureChest.Id.String())
|
transactionsRec := tr.TransactionRecurringItems(transactionsRecurring, "", "", treasureChest.Id.String())
|
||||||
|
|
||||||
var comp templ.Component
|
var comp templ.Component
|
||||||
|
|||||||
@@ -1803,7 +1803,6 @@ func TestIntegrationAccount(t *testing.T) {
|
|||||||
":": 400,
|
":": 400,
|
||||||
"*": 400,
|
"*": 400,
|
||||||
"|": 400,
|
"|": 400,
|
||||||
"\"": 400,
|
|
||||||
"Account": 200,
|
"Account": 200,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ func (s TransactionRecurringImpl) GetAllByAccount(user *types.User, accountId st
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
tx.Commit()
|
err = tx.Commit()
|
||||||
err = db.TransformAndLogDbError("transactionRecurring GetAllByAccount", nil, err)
|
err = db.TransformAndLogDbError("transactionRecurring GetAllByAccount", nil, err)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -273,7 +273,7 @@ func (s TransactionRecurringImpl) GetAllByTreasureChest(user *types.User, treasu
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
tx.Commit()
|
err = tx.Commit()
|
||||||
err = db.TransformAndLogDbError("transactionRecurring GetAllByTreasureChest", nil, err)
|
err = db.TransformAndLogDbError("transactionRecurring GetAllByTreasureChest", nil, err)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -441,10 +441,7 @@ func (s TransactionRecurringImpl) validateAndEnrichTransactionRecurring(
|
|||||||
log.Error("transactionRecurring validate: %v", err)
|
log.Error("transactionRecurring validate: %v", err)
|
||||||
return nil, fmt.Errorf("intervalMonths needs to be greater than 0: %w", ErrBadRequest)
|
return nil, fmt.Errorf("intervalMonths needs to be greater than 0: %w", ErrBadRequest)
|
||||||
}
|
}
|
||||||
active := false
|
active := input.Active == "on"
|
||||||
if input.Active == "on" {
|
|
||||||
active = true
|
|
||||||
}
|
|
||||||
|
|
||||||
transactionRecurring := types.TransactionRecurring{
|
transactionRecurring := types.TransactionRecurring{
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user