feat: add FETCH_PRICE permission for manual price fetch endpoint
The POST /api/audit/price-history/fetch endpoint now requires FETCH_PRICE permission instead of VIEW_AUDIT, which is more semantically correct since it's a write operation.
This commit is contained in:
parent
54709888e1
commit
3806361fac
4 changed files with 5 additions and 2 deletions
|
|
@ -190,7 +190,7 @@ async def get_price_history(
|
|||
@router.post("/price-history/fetch", response_model=PriceHistoryResponse)
|
||||
async def fetch_price_now(
|
||||
db: AsyncSession = Depends(get_db),
|
||||
_current_user: User = Depends(require_permission(Permission.VIEW_AUDIT)),
|
||||
_current_user: User = Depends(require_permission(Permission.FETCH_PRICE)),
|
||||
) -> PriceHistoryResponse:
|
||||
"""Manually trigger a price fetch from Bitfinex."""
|
||||
price, timestamp = await fetch_btc_eur_price()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue