Update the request handler to make it conform to the docs
This commit is contained in:
parent
054fa71b18
commit
885c9c9e71
1 changed files with 3 additions and 4 deletions
|
|
@ -1,17 +1,16 @@
|
|||
import { WebsocketEvent } from "../types/WebsocketEvent";
|
||||
import { log } from "../main";
|
||||
import {
|
||||
IServerInfoRequest
|
||||
} from "common";
|
||||
import { Status } from "common";
|
||||
|
||||
const data: WebsocketEvent = {
|
||||
name: "req:server.info",
|
||||
handler(io, socket, data: IServerInfoRequest) {
|
||||
handler(io, socket) {
|
||||
log.info(`Getting server information`)
|
||||
|
||||
socket.emit(
|
||||
`res:server.info`,
|
||||
{
|
||||
status: Status.Success,
|
||||
version: "0.1",
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue