From f2f3749dabaac47f210c1323995960d46124272a Mon Sep 17 00:00:00 2001 From: hisatri Date: Sat, 9 Nov 2024 14:30:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?kv=E6=95=B0=E6=8D=AE=E5=BA=93=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=8E=A5=E5=8F=A3=EF=BC=9A=E4=BF=AE=E6=94=B9=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E4=BD=93key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/db.py b/api/db.py index c7142fa..377e5d3 100644 --- a/api/db.py +++ b/api/db.py @@ -75,7 +75,7 @@ def kv_del(table_name: str, para: dict) -> tuple[bool, any, int]: check_status: tuple[bool, str, int] = validate_table_name(table_name) if not check_status[0]: return check_status - keys = para.get("key") + keys = para.get("keys") if not keys: return False, "Missing keys.", 422 elif type(keys) is not list: From 12d8f9fa960c85825b8eaad0c365377beb063361 Mon Sep 17 00:00:00 2001 From: hisatri Date: Sat, 9 Nov 2024 14:45:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?DEL=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/db.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/db.py b/api/db.py index 377e5d3..6c4ee99 100644 --- a/api/db.py +++ b/api/db.py @@ -103,6 +103,8 @@ def kv_del(table_name: str, para: dict) -> tuple[bool, any, int]: "timezone": int(datetime.now(timezone.utc).timestamp()), } + return True, results, 200 + def custom_sql(sql: str) -> list[dict]: with sqlite3.connect(saved_path) as conn: