16 lines
429 B
JavaScript
16 lines
429 B
JavaScript
import axios from 'axios';
|
|
|
|
export async function getClient(clientId, _filter = {}) {
|
|
const filter = {
|
|
..._filter,
|
|
include: {
|
|
relation: 'defaultAddress',
|
|
scope: {
|
|
fields: ['id', 'agencyModeFk'],
|
|
},
|
|
},
|
|
where: { id: clientId },
|
|
};
|
|
const params = { filter: JSON.stringify(filter) };
|
|
return await axios.get('Clients', { params });
|
|
}; |