fix(Issuer): correct AllowedCurrencies and Capabilities structure
This commit is contained in:
@@ -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 || [];
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user