mirror of
https://github.com/devproje/balance-application.git
synced 2024-10-20 15:11:21 +00:00
fix: server payload not applied fixed
This commit is contained in:
parent
4eb5ad04f1
commit
6ae4b78a98
1 changed files with 1 additions and 7 deletions
|
@ -91,8 +91,6 @@ def find(id, req: Request, resp: Response):
|
||||||
def update(id, balance: UpdateForm, req: Request, resp: Response):
|
def update(id, balance: UpdateForm, req: Request, resp: Response):
|
||||||
started = datetime.now().microsecond / 1000
|
started = datetime.now().microsecond / 1000
|
||||||
auth = AuthService()
|
auth = AuthService()
|
||||||
|
|
||||||
print(auth.check_auth(req))
|
|
||||||
if not auth.check_auth(req):
|
if not auth.check_auth(req):
|
||||||
resp.status_code = 403
|
resp.status_code = 403
|
||||||
return {
|
return {
|
||||||
|
@ -101,11 +99,7 @@ def update(id, balance: UpdateForm, req: Request, resp: Response):
|
||||||
}
|
}
|
||||||
|
|
||||||
service = BalanceService()
|
service = BalanceService()
|
||||||
|
ok = service.update(int(id), balance)
|
||||||
ok = service.update(
|
|
||||||
int(id),
|
|
||||||
UpdateForm(balance.name, balance.date, balance.price, balance.buy, balance.memo)
|
|
||||||
)
|
|
||||||
|
|
||||||
if not ok == 1:
|
if not ok == 1:
|
||||||
resp.status_code = 500
|
resp.status_code = 500
|
||||||
|
|
Loading…
Reference in a new issue