1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2025-07-12 07:51:08 -04:00

Move splits/transactions to store

This commit is contained in:
2017-12-08 21:27:03 -05:00
parent 61676598dd
commit da7e025509
8 changed files with 410 additions and 406 deletions

View File

@ -187,7 +187,7 @@ func ofxImportHelper(tx *db.Tx, r io.Reader, user *models.User, accountid int64)
split.SecurityId = -1
}
exists, err := SplitAlreadyImported(tx, split)
exists, err := tx.SplitExists(split)
if err != nil {
log.Print("Error checking if split was already imported:", err)
return NewError(999 /*Internal Error*/)
@ -202,7 +202,7 @@ func ofxImportHelper(tx *db.Tx, r io.Reader, user *models.User, accountid int64)
}
for _, transaction := range transactions {
err := InsertTransaction(tx, &transaction, user)
err := tx.InsertTransaction(&transaction, user)
if err != nil {
log.Print(err)
return NewError(999 /*Internal Error*/)