添加依赖管理

This commit is contained in:
whyour
2021-10-23 18:23:32 +08:00
parent bad247c51c
commit 795d1b938d
19 changed files with 1170 additions and 17 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
import { Service, Inject } from 'typedi';
import winston from 'winston';
import { Connection } from 'sockjs';
import { SockMessage } from '../data/sock';
@Service()
export default class SockService {
@@ -25,9 +26,9 @@ export default class SockService {
}
}
public sendMessage(msg: string) {
public sendMessage(msg: SockMessage) {
this.clients.forEach((x) => {
x.write(msg);
x.write(JSON.stringify(msg));
});
}
}