[FIX] Integrations page pagination (#16838)

pull/16877/head
Diego Sampaio 6 years ago committed by GitHub
parent 9c21ff405c
commit 05d8474b8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/integrations/client/views/integrations.js
  2. 2
      app/models/server/models/Integrations.js

@ -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));
});

@ -5,6 +5,8 @@ import { Base } from './_Base';
export class Integrations extends Base {
constructor() {
super('integrations');
this.tryEnsureIndex({ type: 1 });
}
findByType(type, options) {

Loading…
Cancel
Save