diff --git a/common/src/types/events/server_info.ts b/common/src/types/events/server_info.ts index 594a966..a7835af 100644 --- a/common/src/types/events/server_info.ts +++ b/common/src/types/events/server_info.ts @@ -4,4 +4,7 @@ import { ServerResponse } from "../ServerResponse"; export interface IServerInfo extends ServerResponse { /** The version that the server is currently running. */ version?: string; + + /** The count of how many games are currently stored as active in the Database */ + game_count?: number; } \ No newline at end of file diff --git a/server/src/events/server_info.ts b/server/src/events/server_info.ts index 1e1a5d0..dff12dc 100644 --- a/server/src/events/server_info.ts +++ b/server/src/events/server_info.ts @@ -1,7 +1,7 @@ -import { WebsocketEvent } from "../types/WebsocketEvent"; -import { VERSION } from "../constants"; +import { WebsocketEvent } from "@/types/WebsocketEvent"; +import { VERSION } from "@/constants"; +import { games, log } from "@/main"; import { Status } from "common"; -import { log } from "../main"; const data: WebsocketEvent = { name: "req:server.info", @@ -13,6 +13,7 @@ const data: WebsocketEvent = { { status: Status.Success, version: VERSION, + game_count: games.count, } ); },