support user custom exchange rates data

This commit is contained in:
MaysWind
2025-05-26 00:47:19 +08:00
parent c4d20c539f
commit 817291c9a7
41 changed files with 1257 additions and 73 deletions
+9
View File
@@ -37,6 +37,9 @@ import type {
DataStatisticsResponse
} from '@/models/data_management.ts';
import type {
UserCustomExchangeRateUpdateRequest,
UserCustomExchangeRateDeleteRequest,
UserCustomExchangeRateUpdateResponse,
LatestExchangeRateResponse
} from '@/models/exchange_rate.ts';
import type {
@@ -574,6 +577,12 @@ export default {
timeout: getExchangeRatesRequestTimeout() || DEFAULT_API_TIMEOUT
} as ApiRequestConfig);
},
updateUserCustomExchangeRate: (req: UserCustomExchangeRateUpdateRequest): ApiResponsePromise<UserCustomExchangeRateUpdateResponse> => {
return axios.post<ApiResponse<UserCustomExchangeRateUpdateResponse>>('v1/exchange_rates/user_custom/update.json', req);
},
deleteUserCustomExchangeRate: (req: UserCustomExchangeRateDeleteRequest): ApiResponsePromise<boolean> => {
return axios.post<ApiResponse<boolean>>('v1/exchange_rates/user_custom/delete.json', req);
},
generateQrCodeUrl: (qrCodeName: string): string => {
return `${getBasePath()}${BASE_QRCODE_PATH}/${qrCodeName}.png`;
},