stop paged endpoints returning null for empty items (#2597)

This commit is contained in:
kim 2024-02-01 12:45:02 +00:00 committed by GitHub
commit c13eb87ae7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 8 deletions

View file

@ -201,9 +201,6 @@ func (p *Processor) GetVisibleAPIAccountsPaged(
length int,
) []interface{} {
accounts := p.getVisibleAPIAccounts(ctx, 3, requester, next, length)
if len(accounts) == 0 {
return nil
}
items := make([]interface{}, len(accounts))
for i, account := range accounts {
items[i] = account