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,