Skip to content

Commit

Permalink
Merge pull request #1398 from push-protocol/fix-updated-sdk-to-filter…
Browse files Browse the repository at this point in the history
…-via-tag

fix: search response
  • Loading branch information
akp111 authored Sep 26, 2024
2 parents 21c08ba + 6a9d710 commit 5bef248
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/restapi/src/lib/channels/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/restapi/tests/lib/channel/getChannels.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion packages/restapi/tests/lib/channel/search.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('PUSH_CHANNELS.search', () => {
it('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"
});
Expand Down

0 comments on commit 5bef248

Please sign in to comment.