Have the server info use the version constant
This commit is contained in:
parent
cbf7a98bb3
commit
9ce0db9327
1 changed files with 5 additions and 4 deletions
|
|
@ -1,17 +1,18 @@
|
||||||
import { WebsocketEvent } from "../types/WebsocketEvent";
|
import { WebsocketEvent } from "../types/WebsocketEvent";
|
||||||
import { log } from "../main";
|
import { VERSION } from "../constants";
|
||||||
import { Status } from "common";
|
import { Status } from "common";
|
||||||
|
import { log } from "../main";
|
||||||
|
|
||||||
const data: WebsocketEvent = {
|
const data: WebsocketEvent = {
|
||||||
name: "req:server.info",
|
name: "req:server.info",
|
||||||
handler(io, socket) {
|
handler(_, socket) {
|
||||||
log.info(`Getting server information`)
|
log.debug(`Getting server information`)
|
||||||
|
|
||||||
socket.emit(
|
socket.emit(
|
||||||
`res:server.info`,
|
`res:server.info`,
|
||||||
{
|
{
|
||||||
status: Status.Success,
|
status: Status.Success,
|
||||||
version: "0.1",
|
version: VERSION,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue