Filters journal entries by user account
Updates journal entry retrieval to filter entries based on the user's accounts rather than the user ID. This ensures that users only see journal entries that directly affect their accounts. Also displays fiat amount in journal entries if available in the metadata.
This commit is contained in:
parent
b0705fc24a
commit
6d5243b03e
4 changed files with 59 additions and 12 deletions
|
|
@ -157,8 +157,8 @@ async def api_get_user_entries(
|
|||
wallet: WalletTypeInfo = Depends(require_invoice_key),
|
||||
limit: int = 100,
|
||||
) -> list[JournalEntry]:
|
||||
"""Get journal entries created by the current user"""
|
||||
return await get_journal_entries_by_user(wallet.wallet.id, limit)
|
||||
"""Get journal entries that affect the current user's accounts"""
|
||||
return await get_journal_entries_by_user(wallet.wallet.user, limit)
|
||||
|
||||
|
||||
@castle_api_router.get("/api/v1/entries/{entry_id}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue