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:
@ -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*/)
|
||||
|
Reference in New Issue
Block a user