fix(Issuer): correct AllowedCurrencies and Capabilities structure

This commit is contained in:
ghazall-ag
2025-12-04 22:00:53 +03:30
parent 9d2e2c223c
commit fd2b6537cd
17 changed files with 1300 additions and 206 deletions

View File

@@ -4,13 +4,29 @@ import api from './apiClient';
// City API
// -----------------------------
export const cityAPI = {
// GET /api/v1/City (with pagination)
// GET /api/v1/City (with pagination and filters)
async list(params = {}) {
const { currentPage = 1, pageSize = 10, ...otherParams } = params;
const { currentPage = 1, pageSize = 10, countryId, provinceId, ...otherParams } = params;
const requestParams = { currentPage, pageSize, ...otherParams };
// اگر countryId یا provinceId وجود دارد، آن‌ها را به params اضافه کن
if (countryId) {
requestParams.countryId = countryId;
}
if (provinceId) {
requestParams.provinceId = provinceId;
}
console.log('🔵 City API - list request:', { params: requestParams });
const res = await api.get('/api/v1/City', {
params: { currentPage, pageSize, ...otherParams },
params: requestParams,
skipAuthRedirect: true
});
console.log('🟢 City API - list response:', res?.data);
// پاسخ به صورت { data: { data: [...], filterSummary: {...} } } است
return res?.data?.data?.data || [];
},