mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-08 08:28:48 +08:00
Fix save docker host issue
This commit is contained in:
@@ -139,7 +139,7 @@ async function sendDockerHostList(socket) {
|
||||
]);
|
||||
|
||||
for (let bean of list) {
|
||||
result.push(bean.export());
|
||||
result.push(bean.toJSON());
|
||||
}
|
||||
|
||||
io.to(socket.userID).emit("dockerHostList", result);
|
||||
|
@@ -26,8 +26,8 @@ class DockerHost {
|
||||
}
|
||||
|
||||
bean.user_id = userID;
|
||||
bean.docker_daemon = dockerHost.docker_daemon;
|
||||
bean.docker_type = dockerHost.docker_type;
|
||||
bean.docker_daemon = dockerHost.dockerDaemon;
|
||||
bean.docker_type = dockerHost.dockerType;
|
||||
bean.name = dockerHost.name;
|
||||
|
||||
await R.store(bean);
|
||||
|
@@ -7,11 +7,11 @@ class DockerHost extends BeanModel {
|
||||
*/
|
||||
toJSON() {
|
||||
return {
|
||||
id: this._id,
|
||||
userId: this._user_id,
|
||||
daemon: this._dockerDaemon,
|
||||
type: this._dockerType,
|
||||
name: this._name,
|
||||
id: this.id,
|
||||
userID: this.user_id,
|
||||
dockerDaemon: this.docker_daemon,
|
||||
dockerType: this.docker_type,
|
||||
name: this.name,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user