mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 08:44:25 +08:00
show message when force update exchange rates data and the data is up to date
This commit is contained in:
@@ -35,6 +35,13 @@ export function getLatestExchangeRates(context, { silent, force }) {
|
||||
return;
|
||||
}
|
||||
|
||||
const currentData = getExchangeRatesFromLocalStorage();
|
||||
|
||||
if (currentData && currentData.data && utils.isEquals(currentData.data, data.result)) {
|
||||
reject({ message: 'Exchange rates data is up to date' });
|
||||
return;
|
||||
}
|
||||
|
||||
context.commit(STORE_LATEST_EXCHANGE_RATES, {
|
||||
time: now,
|
||||
data: data.result
|
||||
|
||||
Reference in New Issue
Block a user