diff --git a/packages/restapi/src/lib/channels/search.ts b/packages/restapi/src/lib/channels/search.ts index 77b9d433e..957906537 100644 --- a/packages/restapi/src/lib/channels/search.ts +++ b/packages/restapi/src/lib/channels/search.ts @@ -44,7 +44,7 @@ export const search = async (options: SearchChannelOptionsType) => { return axiosGet(requestUrl) .then((response) => { const channels = response.data.channels; - const itemCount = response.data.total || channels.length; + const itemCount = response.data.itemCount || channels.length; const formattedResponse = { itemCount, diff --git a/packages/restapi/tests/lib/channel/getChannels.test.ts b/packages/restapi/tests/lib/channel/getChannels.test.ts index d3a0c3572..380fd3171 100644 --- a/packages/restapi/tests/lib/channel/getChannels.test.ts +++ b/packages/restapi/tests/lib/channel/getChannels.test.ts @@ -11,7 +11,7 @@ describe('PUSH_CHANNELS.getChannels', () => { console.log(res); }); - it.only('Should fetch channels based on the filter and tags', async () => { + it('Should fetch channels based on the filter and tags', async () => { const res = await getChannels({ env: ENV.DEV, tag: 'Infrastructure' diff --git a/packages/restapi/tests/lib/channel/search.test.ts b/packages/restapi/tests/lib/channel/search.test.ts index 59df81a5e..7cd27a4f6 100644 --- a/packages/restapi/tests/lib/channel/search.test.ts +++ b/packages/restapi/tests/lib/channel/search.test.ts @@ -22,10 +22,10 @@ describe('PUSH_CHANNELS.search', () => { console.log(res); }); - it('Should fetch channels based on the filter in new format', async () => { + it.only('Should fetch channels based on the filter in new format', async () => { const res = await search({ env: ENV.DEV, - query: "Channel", + query: "a", oldFormat: false, tag: "Infrastructure" });