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

Finish 'store' separation

This commit is contained in:
2017-12-09 05:56:45 -05:00
parent af97f92df5
commit 32aef11da5
15 changed files with 100 additions and 134 deletions

View File

@ -4,7 +4,7 @@ import (
"context"
"errors"
"github.com/aclindsa/moneygo/internal/models"
"github.com/aclindsa/moneygo/internal/store/db"
"github.com/aclindsa/moneygo/internal/store"
"github.com/yuin/gopher-lua"
"strings"
)
@ -16,7 +16,7 @@ func luaContextGetAccounts(L *lua.LState) (map[int64]*models.Account, error) {
ctx := L.Context()
tx, ok := ctx.Value(dbContextKey).(*db.Tx)
tx, ok := ctx.Value(dbContextKey).(store.Tx)
if !ok {
return nil, errors.New("Couldn't find tx in lua's Context")
}
@ -150,7 +150,7 @@ func luaAccountBalance(L *lua.LState) int {
a := luaCheckAccount(L, 1)
ctx := L.Context()
tx, ok := ctx.Value(dbContextKey).(*db.Tx)
tx, ok := ctx.Value(dbContextKey).(store.Tx)
if !ok {
panic("Couldn't find tx in lua's Context")
}