feat: middle save

This commit is contained in:
Project_IO 2024-09-15 12:31:20 +09:00
parent d279776baa
commit 4eb5ad04f1
2 changed files with 2 additions and 2 deletions

View file

@ -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()

View file

@ -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,