From 4eb5ad04f1edc1677448d206ffc9ac79ebf3b975 Mon Sep 17 00:00:00 2001 From: Project_IO Date: Sun, 15 Sep 2024 12:31:20 +0900 Subject: [PATCH] feat: middle save --- routes/balance.py | 2 +- service/balance_service.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/balance.py b/routes/balance.py index 6220a7b..111bd29 100644 --- a/routes/balance.py +++ b/routes/balance.py @@ -87,7 +87,7 @@ def find(id, req: Request, resp: Response): "respond_time": "{}ms".format(round((datetime.now().microsecond / 1000) - started)) } -@router.patch("/balance/{id}") +@router.put("/balance/{id}") def update(id, balance: UpdateForm, req: Request, resp: Response): started = datetime.now().microsecond / 1000 auth = AuthService() diff --git a/service/balance_service.py b/service/balance_service.py index 0512138..005c553 100644 --- a/service/balance_service.py +++ b/service/balance_service.py @@ -86,7 +86,7 @@ class BalanceService: ok = True cur = self._conn.cursor() try: - cur.execute(f"update balset set name = %s, date = %s, price = %s, buy = %s, memo = %s where id = %s;", ( + cur.execute("update balset set name = %s, date = %s, price = %s, buy = %s, memo = %s where id = %s;", ( balance.name, balance.date, balance.price,