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

Move accounts to store

This commit is contained in:
2017-12-07 20:47:55 -05:00
parent bec5152e53
commit 3326c3b292
11 changed files with 211 additions and 183 deletions

View File

@ -39,7 +39,7 @@ func ofxImportHelper(tx *db.Tx, r io.Reader, user *models.User, accountid int64)
}
// Return Account with this Id
account, err := GetAccount(tx, accountid, user.UserId)
account, err := tx.GetAccount(accountid, user.UserId)
if err != nil {
log.Print(err)
return NewError(3 /*Invalid Request*/)
@ -218,7 +218,7 @@ func OFXImportHandler(context *Context, r *http.Request, user *models.User, acco
return NewError(3 /*Invalid Request*/)
}
account, err := GetAccount(context.Tx, accountid, user.UserId)
account, err := context.Tx.GetAccount(accountid, user.UserId)
if err != nil {
return NewError(3 /*Invalid Request*/)
}