refactor: remove databases from code an use schemas instead
All databases are now saved together in the same LNBITS_DATA_FOLDER. Extensions have to define a schema.yml file for creating the necessary database.
This commit is contained in:
+3
-6
@@ -3,12 +3,9 @@ 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
|
||||
def default(self, obj):
|
||||
if isinstance(obj, sqlite3.Row):
|
||||
return {k: obj[k] for k in obj.keys()}
|
||||
return obj
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user