mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 23:33:13 +09:00
Fix types related to plugins and the web interface
This commit is contained in:
1 parent
8b5c66d900
commit
70d2b319b3
10 files changed
+17
-26
No files matched your search
@@ -46,10 +46,10 @@ export class ControllerPlugin extends BaseControllerPlugin {
|
||||
}, 60e3).unref();
|
||||
|
||||
this.controller.app.get("/api/player_auth/servers", (req: Request, res: Response) => {
|
||||
let servers = [];
|
||||
let servers: string[] = [];
|
||||
for (let instance of this.controller.instances!.values()) {
|
||||
if (instance.status === "running" && instance.config.get("player_auth.load_plugin")) {
|
||||
servers.push(instance.config.get("factorio.settings")["name"] || "unnamed server");
|
||||
servers.push(instance.config.get("factorio.settings")["name"] as string || "unnamed server");
|
||||
}
|
||||
}
|
||||
res.send(servers);
|
||||
|
||||
Reference in new issue
Block a user