Took 32 minutes
This commit is contained in:
2022-11-18 00:01:56 +01:00
parent 03dd0e0fb6
commit 016f4bc3fe
7 changed files with 77 additions and 5 deletions

View File

@ -2,6 +2,7 @@ import {WebSocketPayload} from "./WebSocketPayload";
import {WebSocketEvent} from "./WebSocketEvent";
import {iTender} from "./iTender";
import {Settings} from "./Settings";
import Container from "./database/Container";
export class WebSocketHandler {
private static _ws: WebSocket;
@ -40,4 +41,11 @@ export class WebSocketHandler {
WebSocketHandler.send(payload).then(resolve);
})
}
static sendContainers() {
return new Promise(async resolve => {
let payload = new WebSocketPayload(WebSocketEvent.CONTAINERS, false, ( await Container.find() ));
WebSocketHandler.send(payload).then(resolve);
})
}
}