1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2025-07-03 04:38:38 -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

@ -437,7 +437,7 @@ func GnucashImportHandler(r *http.Request, context *Context) ResponseWriterWrite
}
split.AccountId = acctId
exists, err := SplitAlreadyImported(context.Tx, split)
exists, err := context.Tx.SplitExists(split)
if err != nil {
log.Print("Error checking if split was already imported:", err)
return NewError(999 /*Internal Error*/)
@ -446,7 +446,7 @@ func GnucashImportHandler(r *http.Request, context *Context) ResponseWriterWrite
}
}
if !already_imported {
err := InsertTransaction(context.Tx, &transaction, user)
err := context.Tx.InsertTransaction(&transaction, user)
if err != nil {
log.Print(err)
return NewError(999 /*Internal Error*/)