25 lines
730 B
JavaScript
25 lines
730 B
JavaScript
const { withClient } = require("./withClient");
|
|
|
|
async function getAdvisors({ bodyshopId, ...criteria }) {
|
|
return withClient(bodyshopId, async (client, routing) => {
|
|
const res = await client.getAdvisors(criteria, { routing });
|
|
return res;
|
|
});
|
|
}
|
|
|
|
async function getParts({ bodyshopId, ...criteria }) {
|
|
return withClient(bodyshopId, async (client, routing) => {
|
|
const res = await client.getParts(criteria, { routing });
|
|
return res;
|
|
});
|
|
}
|
|
|
|
async function combinedSearch({ bodyshopId, ...query }) {
|
|
return withClient(bodyshopId, async (client, routing) => {
|
|
const res = await client.combinedSearch(query, { routing });
|
|
return res;
|
|
});
|
|
}
|
|
|
|
module.exports = { getAdvisors, getParts, combinedSearch };
|