Skip to content

Commit

Permalink
Fix: Add only parameters for collections
Browse files Browse the repository at this point in the history
  • Loading branch information
Ifycode authored and tuxpiper committed Nov 26, 2024
1 parent 54aa97b commit b986eb7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
CollectionResult,
PostResult,
AccountNotificationsInterface,
apiHelpers,
} from '@mzima-client/sdk';
import { BaseComponent } from '../../../base.component';
import { ConfirmModalService } from '../../../core/services/confirm-modal.service';
Expand Down Expand Up @@ -152,6 +153,7 @@ export class CollectionsComponent extends BaseComponent implements OnInit {
orderby: 'created',
order: 'desc',
q: query,
only: apiHelpers.ONLY.NAME_ID_DESCRIPTION,
};

if (this.post?.id) {
Expand Down
3 changes: 3 additions & 0 deletions libs/sdk/src/lib/helpers/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export const ONLY = {
NAME_ID: 'name,id',
NAME_ID_COLOR: 'name,id,color',
NAME_COLOR_PERMISSIONS: 'name,color,everyone_can_create,can_create',
NAME_ID_DESCRIPTION: 'name,id,description',
NEEDED_POSTS_LIST_PROPERTIES:
'id,title,status,color,contact,locks,post_media,data_source_message_id',
};

export const API_V_3 = `api/v3/`;
Expand Down

0 comments on commit b986eb7

Please sign in to comment.