take JS out of HTML, fix transactions chart, add apipayments.time.

This commit is contained in:
fiatjaf
2019-12-14 17:26:26 -03:00
parent 14dfa9ecc6
commit 463ee21c9f
8 changed files with 536 additions and 564 deletions
+16
View File
@@ -0,0 +1,16 @@
import json
import sqlite3
class MegaEncoder(json.JSONEncoder):
def default(self, o):
if type(o) == sqlite3.Row:
val = {}
for k in o.keys():
val[k] = o[k]
return val
return o
def megajson(o):
return json.dumps(o, cls=MegaEncoder)