Skip to content

Commit

Permalink
[FIX] Integrations page pagination (#16838)
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego authored Mar 12, 2020
1 parent 9c21ff4 commit 05d8474
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/integrations/client/views/integrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Template.integrations.onCreated(async function() {

this.autorun(async () => {
const offset = this.offset.get();
const { integrations, total } = await APIClient.v1.get(`integrations.list?count=${ ITEMS_COUNT }&offset=${ offset }`);
const { integrations, total } = await APIClient.v1.get(`integrations.list?sort={"type":1}&count=${ ITEMS_COUNT }&offset=${ offset }`);
this.total.set(total);
this.integrations.set(this.integrations.get().concat(integrations));
});
Expand Down
2 changes: 2 additions & 0 deletions app/models/server/models/Integrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { Base } from './_Base';
export class Integrations extends Base {
constructor() {
super('integrations');

this.tryEnsureIndex({ type: 1 });
}

findByType(type, options) {
Expand Down

0 comments on commit 05d8474

Please sign in to comment.