page limit added

This commit is contained in:
Drew Ansbacher
2021-08-23 10:14:12 -06:00
committed by Aiden McClelland
parent 0b618d7a68
commit 8e9daaa056
4 changed files with 14 additions and 10 deletions

View File

@@ -28,15 +28,17 @@ export class AppLogsPage {
}
async getLogs () {
const limit = 200
try {
// get logs
const logs = await this.embassyApi.getPackageLogs({
id: this.pkgId,
before: this.before,
limit,
})
this.firstTimeLoaded = true
if (!logs.length) {
if (logs.length < limit) {
this.needInfinite = false
return
}

View File

@@ -26,11 +26,12 @@ export class ServerLogsPage {
}
async getLogs () {
const limit = 200
try {
// get logs
const logs = await this.embassyApi.getServerLogs({ before: this.before })
const logs = await this.embassyApi.getServerLogs({ before: this.before, limit })
if (!logs.length) {
if (logs.length < limit) {
this.needInfinite = false
return
}