aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2022-03-21 23:04:27 +0100
committerstonedDiscord <Tukz@gmx.de>2022-03-21 23:04:27 +0100
commitf73e7e4a16c45c514d3fc154066521fb3cd363ea (patch)
treeb9a5d58dd34a231c11a7a5307286ba5b60543575 /webAO
parent4e6fb6ba43caa1eda676c409201588ef500d4a0c (diff)
the server type is a mess
Diffstat (limited to 'webAO')
-rw-r--r--webAO/master.ts6
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;