mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: update front layout
This commit is contained in:
@@ -8,21 +8,8 @@ interface Tld {
|
||||
}
|
||||
|
||||
export async function getTldList(params: object): Promise<Tld[]> {
|
||||
let page = 1
|
||||
let response = (await request<Tld[]>({
|
||||
return (await request<Tld[]>({
|
||||
url: 'tld',
|
||||
params: {...params, page},
|
||||
params,
|
||||
})).data
|
||||
const tldList: Tld[] = response;
|
||||
|
||||
while (response.length !== 0) {
|
||||
page++
|
||||
response = (await request<Tld[]>({
|
||||
url: 'tld',
|
||||
params: {...params, page},
|
||||
})).data
|
||||
|
||||
tldList.push(...response)
|
||||
}
|
||||
return tldList
|
||||
}
|
||||
Reference in New Issue
Block a user