Automated update of Base Application package.

This commit is contained in:
bot 2024-12-14 20:29:09 +00:00
parent 0cde635443
commit b15f7e6d53
3 changed files with 2 additions and 4 deletions

Binary file not shown.

BIN
dist/app-1.0.0.tar.gz vendored

Binary file not shown.

View File

@ -172,13 +172,13 @@ class WebDbApplication(BaseApplication):
return web.json_response(response)
async def set(self, key, value):
return self.sset(key,value)
return self.sset(key, value)
def sset(self, key, value):
value = json.dumps(value, default=str)
return self.db["kv"].upsert({"key": key, "value": value}, ["key"])
async def get(key,default=None):
async def get(key, default=None):
return self.sget(key, default)
def sget(self, key, default=None):
@ -188,8 +188,6 @@ class WebDbApplication(BaseApplication):
return result == "null" and default or json.loads(result)
return default
async def insert(self, table_name, data):
return self.db[table_name].insert(data)