fix: use merchant id instead of user id

This commit is contained in:
Vlad Stan 2023-03-15 11:25:52 +02:00
parent 40a52e9134
commit 856ad53b7e
3 changed files with 18 additions and 17 deletions

View file

@ -175,7 +175,7 @@ async def api_update_zone(
status_code=HTTPStatus.NOT_FOUND,
detail="Zone does not exist.",
)
zone = await update_zone(wallet.wallet.user, data)
zone = await update_zone(merchant.id, data)
assert zone, "Cannot find updated zone"
return zone
except HTTPException as ex:
@ -201,7 +201,7 @@ async def api_delete_zone(zone_id, wallet: WalletTypeInfo = Depends(require_admi
detail="Zone does not exist.",
)
await delete_zone(wallet.wallet.user, zone_id)
await delete_zone(merchant.id, zone_id)
except Exception as ex:
logger.warning(ex)