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

lua: Add account balances

This commit is contained in:
2017-01-27 21:50:02 -05:00
parent f3becb7f5c
commit d059cd19ee
4 changed files with 139 additions and 23 deletions

View File

@ -15,6 +15,7 @@ const (
userContextKey key = iota
accountsContextKey
securitiesContextKey
balanceContextKey
)
const luaTimeoutSeconds time.Duration = 5 // maximum time a lua request can run for
@ -58,6 +59,7 @@ func ReportHandler(w http.ResponseWriter, r *http.Request) {
luaRegisterAccounts(L)
luaRegisterSecurities(L)
luaRegisterBalances(L)
err := L.DoString(`accounts = account.get_all()
last_parent = nil