diff options
| author | stonedDiscord <Tukz@gmx.de> | 2022-03-21 23:04:27 +0100 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2022-03-21 23:04:27 +0100 |
| commit | f73e7e4a16c45c514d3fc154066521fb3cd363ea (patch) | |
| tree | b9a5d58dd34a231c11a7a5307286ba5b60543575 /webAO/master.ts | |
| parent | 4e6fb6ba43caa1eda676c409201588ef500d4a0c (diff) | |
the server type is a mess
Diffstat (limited to 'webAO/master.ts')
| -rw-r--r-- | webAO/master.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/webAO/master.ts b/webAO/master.ts index 1b7d5ba..8fd8779 100644 --- a/webAO/master.ts +++ b/webAO/master.ts @@ -117,7 +117,7 @@ function checkOnline(serverID: number, coIP: string) { }; } -function loadServerlist(thelist: string) { +function loadServerlist(thelist: { name: string, description: string, ip: string, port: number, ws_port: number, assets: string, online: string }[]) { localStorage.setItem('masterlist', JSON.stringify(thelist)); processServerlist(thelist); } @@ -131,9 +131,9 @@ function cachedServerlist(response: Response) { return response.json(); } -function processServerlist(thelist: Array<object>) { +function processServerlist(thelist: { name: string, description: string, ip: string, port: number, ws_port: number, assets: string, online: string }[]) { for (let i = 0; i < thelist.length - 1; i++) { - const serverEntry = thelist[i]; + const serverEntry: { name: string, description: string, ip: string, port: number, ws_port: number, assets: string, online: string } = thelist[i]; servers[i] = serverEntry; |
