File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -126,19 +126,11 @@ class AdminApi {
126
126
}
127
127
128
128
async getNewUserAccounts ( limit : number ) : Promise < UserAccountShort [ ] > {
129
- let users : UserAccountShort [ ] = [ ]
130
- let nextToken : string | null = null
131
- let total : number | null = null
132
- do {
133
- const result = ( await this . makeRequest (
134
- "GET" ,
135
- `/v2/users?limit=${ limit } ${ nextToken ? `&from=${ nextToken } ` : `` } &guests=false&order_by=creation_ts&dir=b` ,
136
- ) ) as UserAccountsResponse
137
- users = users . concat ( result . users )
138
- nextToken = result . next_token || null
139
- total = result . total
140
- } while ( nextToken !== null || users . length < total )
141
- return users
129
+ const result = ( await this . makeRequest (
130
+ "GET" ,
131
+ `/v2/users?limit=${ limit } &guests=false&order_by=creation_ts&dir=b` ,
132
+ ) ) as UserAccountsResponse
133
+ return result . users
142
134
}
143
135
144
136
async getRooms ( ) : Promise < RoomInfoShort [ ] > {
You can’t perform that action at this time.
0 commit comments