mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
Persist mods and port correctly
This commit is contained in:
parent
269cb62ec1
commit
6643d6ece1
10
manager.js
10
manager.js
@ -79,14 +79,14 @@ function Manager() {
|
||||
};
|
||||
|
||||
Manager.prototype.addServer = (function (id, title) {
|
||||
var server = this._addServer(id, title);
|
||||
mods = [];
|
||||
port = 2302;
|
||||
var server = this._addServer(id, title, mods, port);
|
||||
this.save();
|
||||
return server;
|
||||
});
|
||||
|
||||
Manager.prototype._addServer = (function (id, title) {
|
||||
mods = [];
|
||||
port = 2302;
|
||||
Manager.prototype._addServer = (function (id, title, port, mods) {
|
||||
var server = new Server(id, title, port, mods)
|
||||
this.serversArr.push(server);
|
||||
this.serversHash[id] = server;
|
||||
@ -111,7 +111,7 @@ Manager.prototype.load = (function () {
|
||||
}
|
||||
|
||||
JSON.parse(data).forEach(function (server) {
|
||||
self._addServer(server.id, server.title);
|
||||
self._addServer(server.id, server.title, server.port, server.mods);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user