Add a supplementary rate feed for currencies the ECB lacks (e.g. ALL)
The server also fetches ExchangeRate-API's free EUR-based endpoint (RATES_EXTRA_URL, empty = off), stored apart from ECB rates; ECB always wins for a currency both publish. /api/rates returns sources for supplementary rates, expenses record them as xr:<date>, and the editor shows the required attribution link. Snapshots older than a week before the requested date are not used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HA82gVKYyo9BHLHPW4qr4x
This commit is contained in:
parent
6b0c80bb50
commit
62c19192a7
13 changed files with 160 additions and 27 deletions
|
|
@ -62,7 +62,7 @@ export const api = {
|
|||
pushSubscribe: (id: string, token: string, sub: PushSubscriptionJSON, deviceId: string) =>
|
||||
req('POST', `/api/groups/${id}/push`, { token, json: { ...sub, deviceId } }),
|
||||
pushUnsubscribe: (id: string, token: string, endpoint: string) => req('DELETE', `/api/groups/${id}/push`, { token, json: { endpoint } }),
|
||||
rates: (date: string) => req<{ base: string; date: string; rates: Record<string, string> }>('GET', `/api/rates?date=${date}`),
|
||||
rates: (date: string) => req<{ base: string; date: string; rates: Record<string, string>; sources?: Record<string, string> }>('GET', `/api/rates?date=${date}`),
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue