feat: update front layout

This commit is contained in:
Maël Gangloff
2024-07-25 02:09:49 +02:00
parent 465aeb1ec9
commit 08da62c1b5
18 changed files with 405 additions and 168 deletions

28
assets/utils/api/tld.ts Normal file
View File

@@ -0,0 +1,28 @@
import {request} from "./index";
interface Tld {
tld: string
contractTerminated: boolean
registryOperator: string
specification13: boolean
}
export async function getTldList(params: object): Promise<Tld[]> {
let page = 1
let response = (await request<Tld[]>({
url: 'tld',
params: {...params, page},
})).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
}