fix: TipJar wallet access bug

This commit is contained in:
Stefan Stammberger 2021-11-17 14:33:23 +01:00
parent 4c77d6f11e
commit d8e4237961
No known key found for this signature in database
GPG Key ID: 645FA807E935D9D5

View File

@ -172,7 +172,7 @@ async def api_delete_tip(
raise HTTPException(
status_code=HTTPStatus.NOT_FOUND, detail="No tip with this ID!"
)
if tip.wallet != g.wallet.id:
if tip.wallet != wallet.wallet.id:
raise HTTPException(
status_code=HTTPStatus.FORBIDDEN,
detail="Not authorized to delete this tip!",
@ -192,7 +192,7 @@ async def api_delete_tipjar(
raise HTTPException(
status_code=HTTPStatus.NOT_FOUND, detail="No tipjar with this ID!"
)
if tipjar.wallet != g.wallet.id:
if tipjar.wallet != wallet.wallet.id:
raise HTTPException(
status_code=HTTPStatus.FORBIDDEN,