Adds API endpoint for default currency
Adds an API endpoint to retrieve the default accounting currency configured for the LNbits instance. Returns the configured default currency or None if not set.
This commit is contained in:
parent
44ba4e4086
commit
0d579892a8
1 changed files with 10 additions and 0 deletions
|
|
@ -100,6 +100,16 @@ async def api_list_currencies_available() -> list[str]:
|
|||
return allowed_currencies()
|
||||
|
||||
|
||||
@api_router.get("/api/v1/default-currency")
|
||||
async def api_get_default_currency() -> dict[str, str | None]:
|
||||
"""
|
||||
Get the default accounting currency for this LNbits instance.
|
||||
Returns the configured default, or None if not set.
|
||||
"""
|
||||
default_currency = settings.lnbits_default_accounting_currency
|
||||
return {"default_currency": default_currency}
|
||||
|
||||
|
||||
@api_router.post("/api/v1/conversion")
|
||||
async def api_fiat_as_sats(data: ConversionData):
|
||||
output = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue