fix: Use COMPLETE_EXCHANGE permission for complete/no-show endpoints

The complete_trade and mark_no_show endpoints now use the dedicated
COMPLETE_EXCHANGE permission instead of CANCEL_ANY_EXCHANGE, which
better reflects the semantics of these operations.
This commit is contained in:
counterweight 2025-12-23 10:37:32 +01:00
parent bf57fc6b77
commit 3a22534c04
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C

View file

@ -684,7 +684,7 @@ async def get_past_trades(
async def complete_trade(
exchange_id: int,
db: AsyncSession = Depends(get_db),
_current_user: User = Depends(require_permission(Permission.CANCEL_ANY_EXCHANGE)),
_current_user: User = Depends(require_permission(Permission.COMPLETE_EXCHANGE)),
) -> AdminExchangeResponse:
"""Mark a trade as completed. Only possible after slot time has passed."""
@ -730,7 +730,7 @@ async def complete_trade(
async def mark_no_show(
exchange_id: int,
db: AsyncSession = Depends(get_db),
_current_user: User = Depends(require_permission(Permission.CANCEL_ANY_EXCHANGE)),
_current_user: User = Depends(require_permission(Permission.COMPLETE_EXCHANGE)),
) -> AdminExchangeResponse:
"""Mark a trade as no-show. Only possible after slot time has passed."""