Skip to content

Commit

Permalink
fix: fixed contacts client empty result [WTEL-5537](https://webitel.a…
Browse files Browse the repository at this point in the history
  • Loading branch information
dlohvinov committed Nov 17, 2024
1 parent b405d09 commit 9113858
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@webitel/ui-sdk",
"version": "24.10.80",
"version": "24.10.81",
"private": false,
"scripts": {
"dev": "vite",
Expand Down
6 changes: 4 additions & 2 deletions src/api/clients/сontacts/contacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,14 @@ const getList = async (params) => {
id,
qin,
);
const { data, next } = applyTransform(response.data, [

const { items, next } = applyTransform({ ...response.data, items: response.data.data || [] }, [
snakeToCamel(),
merge(getDefaultGetListResponse()),
]);

return {
items: applyTransform(data, [(items) => items?.map((item) => formatAccessMode(item)), listResponseHandler]),
items: applyTransform(items, [(items) => items?.map((item) => formatAccessMode(item)), listResponseHandler]),
next,
};
} catch (err) {
Expand Down

0 comments on commit 9113858

Please sign in to comment.